A malformed session description can assign the same codec to
different payload types which would hit a DCHECK in the
WebRtcVideoEngine. This changes the video engine to just ignore
the duplicate payload type instead of failing.
Bug: chromium:987598
Change-Id: I2034dd11d315ef05448630c860c7ca3f69ef700b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147943
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28796}
This is a reland of 74a1b4b132
Original change's description:
> Only include payload in bytes sent/received.
>
> According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
> https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
> statistic should not include headers or padding.
>
> Similarly, according to
> https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
> received are calculated the same way as bytes sent (eg. not including
> padding or headers).
>
> This change stops adding padding and headers to these statistics.
>
> Bug: webrtc:8516,webrtc:10525
> Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28647}
Bug: webrtc:8516, webrtc:10525
Change-Id: Iaa1613e5becdfaa0af0f6b9f00e5b871937a719c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147520
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28731}
This reverts commit 74a1b4b132.
Reason for revert: requested by chromium
Original change's description:
> Only include payload in bytes sent/received.
>
> According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
> https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
> statistic should not include headers or padding.
>
> Similarly, according to
> https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
> received are calculated the same way as bytes sent (eg. not including
> padding or headers).
>
> This change stops adding padding and headers to these statistics.
>
> Bug: webrtc:8516,webrtc:10525
> Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28647}
TBR=steveanton@webrtc.org,ilnik@webrtc.org,hbos@webrtc.org,ossu@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,mellem@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8516, webrtc:10525
Change-Id: Ibd31a8264c19f0c6f57d8deb3974593d198046ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147400
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28701}
According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and
https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent
statistic should not include headers or padding.
Similarly, according to
https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes
received are calculated the same way as bytes sent (eg. not including
padding or headers).
This change stops adding padding and headers to these statistics.
Bug: webrtc:8516,webrtc:10525
Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28647}
As per the spec, you should be able to use simulcast with screenshare.
We remove the field trial for it and keep the old behavior only for
screenshare sources with conference flag on.
Bug: webrtc:8785
Change-Id: I1d6d4e18256fb5cfe0195620706de068f25b8d9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144785
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28543}
In this CL:
- Added WEBRTC_VIDEO_CODEC_ENCODER_FAILURE return code that can
be returned by the encoder wrapper in case of a broken encoder.
- Added EncoderFailureCallback interface that can be called
to request encoder fallback to be performed. Implemented by
WebRtcVideoChannel and called from the VideoStreamEncoder.
- Updated SelectSendVideoCodec to select all compatible codecs instead
of just one.
Bug: webrtc:10795
Change-Id: I87a83fd02e48c40493c930471c06c3d0941031ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140888
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28462}
This change replaces the `ContributingSources`-implementation of `GetContributingSources()` and `GetSynchronizationSources()` on the video side with the spec-compliant `SourceTracker`-implementation.
The most noticeable impact is that the per-frame dictionaries are now updated when frames are delivered to the RTCRtpReceiver's MediaStreamTrack rather than when RTP packets are received on the network.
Bug: webrtc:10545
Change-Id: I895b5790280ac94c1501801d226c643633c67349
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143177
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28386}
And delete corresponding plumbing via the internal stats attribute
MediaReceiverInfo::fraction_lost. The latter attribute is not deleted
yet, since downstream projects have to be updated first.
Bug: webrtc:10744
Change-Id: Id5401aeee7e5637a406ddf2fa33fbfe336abec9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143178
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28385}
Raw RTP packetization is done using the existing RtpPacketizerGeneric
without adding the generic payload header. It is intended to be used
together with generic frame descriptor RTP header extension.
Bug: webrtc:10625
Change-Id: I2e3d0a766e4933ddc4ad4abc1449b9b91ba6cd35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138061
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28154}
H264 requires that the packetization modes are the same in order to
consider the code the same. This logic was added to VideoCodec::Matches
but was not reflected in IsSameCodec. This could manifest itself when a
remote description with an unsupported packetization mode is set.
Bug: webrtc:10693
Change-Id: Icda07f7d56a464895d2267a41cc0f2fd9d5f42ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138983
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28126}
When the LossNotifications field trial is in effect, LNTF should
be offered/accepted in the SDP message, not assumed to be configured
on both sides equally.
Bug: webrtc:10662
Change-Id: Ibd827779bd301821cbb4196857f6baebfc9e7dc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138079
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28056}
Currently we pass media_transport from PeerConnection to media layers. The goal of this change is to replace media_transport with struct MediaTransportCondif, which will enable adding different transports (i.e. we plan to add DatagramTransport) as well as other media-transport related settings without changing 100s of files.
TODO: In the future we should consider also adding rtp_transport in the same config, but it will require a bit more work, so I did not include it in the same change.
Bug: webrtc:9719
Change-Id: Ie31e1faa3ed9e6beefe30a3da208130509ce00cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137181
Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28016}
This patch makes VideoBitrateAllocatorFactory injectable
by adding to PeerConnectionDependencies instead of allowing it to be
overridden using MediaEngine (on PeerConnectionFactory).
With this patch VideoBitrateAllocatorFactory is owned
by the PeerConnection.
WANT_LGTM (examples) : sakal@
WANT_LGTM (api/pc) : steveanton@
Bug: webrtc:10547
Change-Id: I768d400a621f2b7a98795eb7f410adb48651bfd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132706
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27654}
Semi-automatically created with:
git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format
After this, two .cc files failed to compile and I have fixed them
manually.
Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
This adds WebRTC-Vp9InterLayerPred field trial that allows to control
inter-layer prediction mode in VP9 encoder.
Bug: chromium:949536
Change-Id: Iea03db07fd21f28ab58382c5fdaac68acacc701c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131322
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27521}
This is a better solution than https://webrtc-review.googlesource.com/c/src/+/129929 (which got reverted).
This CL instead filters out unused SSRCs from RtpConfig for RtpVideoSender.
Bug: webrtc:10485
Change-Id: Iaa8d07681419a2387c8253eb38e08a0828e9e688
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130505
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27433}
WebRTC video engine now configures bitrate on media transport
correctly.
Bug: webrtc:9719
Change-Id: I85884cd76644b7eca3763cec8ce9e31b5b64db27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127941
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27167}
MediaChannel accepted the RtpPacket buffers through non-const pointer.
This is both unclear and introduces questions regarding if the buffer is
actually copied or not.
This change modifies the method to accept by value to reduce ambiguity.
Usage of the non-const data() method which could potentially copy the
buffer contents is also reduced in favor of cdata() which never copies.
Bug: None
Change-Id: I3b2daef0d31cb6aacceb46c86da3a40ce836242b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127340
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27090}
On api level two methods were added to api/media_stream_interface.cc on VideoSourceInterface,
GetLatency and SetLatency. Latency is measured in seconds, delay in milliseconds but both describes
the same concept.
Bug: webrtc:10287
Change-Id: Ib8dc62a4d73f63fab7e10b82c716096ee6199957
Reviewed-on: https://webrtc-review.googlesource.com/c/123482
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26877}
RIDs will now appear in the sent packets when they are supplied.
This is relevant for the Simulcast scenario which uses RIDs to
identify the different layers.
Bug: webrtc:10074
Change-Id: I2f281abc144f467e151a30ec13b8c375be4ac3e6
Reviewed-on: https://webrtc-review.googlesource.com/c/124140
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26843}
The discardability flag denotes whether the frame may be dropped by
the decoder with no effect on the decodability of subsequent frames.
Bug: webrtc:10214
Change-Id: I3654951d8863b50effe9670b8d1d7eb051240039
Reviewed-on: https://webrtc-review.googlesource.com/c/122241
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26763}
Hard-coding default values forces IDs over 14 to be used even
when we offer less than 15 different extensions.
Note that the code relies on MergeRtpHdrExts for making sure
that extension IDs are kept consistent and non-colliding between
different streams (audio/video).
Bug: webrtc:10288
Change-Id: I3e59f7ddc8ca43cea91084a6b7f36df70fb6be4a
Reviewed-on: https://webrtc-review.googlesource.com/c/121646
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26622}
With this CL, we normalize the resolution coming from the
capturer, before applying the requested scaling factors.
That has the benefit that the actual scale factor between
two layers will be the fraction of the requested scale
factors of the two layers.
Prior to this CL, when the normalization was done per layer,
the actual scale factor between two layers might not
have been the fraction of the requested scale factors
of the two layers.
Bug: webrtc:10069
Change-Id: I9ca4d394f259d5d37faee96a41204ff8df898907
Reviewed-on: https://webrtc-review.googlesource.com/c/121425
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26550}
Support varies by codec, especially in the simulcast case, but using
the EncoderSimulcastProxy codec should fix this.
Bug: webrtc:10069
Change-Id: Idb6a5f400ffda1cdb139004f540961a9cf85d224
Reviewed-on: https://webrtc-review.googlesource.com/c/119400
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26449}
It only tests the videoadaptation in the test class FakeVideoCapturer.
Bug: webrtc:6353
Change-Id: I4766eebc5cfa7412fde9fd6e5173f1b2381a5d87
Reviewed-on: https://webrtc-review.googlesource.com/c/118042
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26297}
Test wiring to DegradationPreference passed to
VideoSendStream::SetSource, but not the adaptation implemented in the
test class FakeVideoCapturer.
Bug: webrtc:6353
Change-Id: Iec2ae89283fb856822ea2829db17eaa02337b467
Reviewed-on: https://webrtc-review.googlesource.com/c/117641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26278}
A capturer with this flag was set in
WebRtcVideoChannelTest.PreviousAdaptationDoesNotApplyToScreenshare.
But the flag is used only by the VideoCapturerTrackSource class, which
isn't used in this test.
Bug: webrtc:6353
Change-Id: I58058c882c5a65b5cfa9921e302c422c8ccb20a9
Reviewed-on: https://webrtc-review.googlesource.com/c/117561
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26256}
Replaced with a combination of cricket::FakeFrameSource and
webrtc::test::FrameForwarder. This cl converts the first three
affected tests, the rest will follow.
Bug: webrtc:6353
Change-Id: I556f6b58f4ca81234ffae3dc6e1319f9c60a76ae
Reviewed-on: https://webrtc-review.googlesource.com/c/117260
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26239}