Since AddTrack now has an implicit init_encodings value, it will also
have a StableState saved when associating a transceiver.
That state may not have a saved mid and mline_index, and so on a
rollback, it could blindly reset the mid and mline_index of an
associated transceiver.
This is wrong, the mid and mline_index of associated transceivers
should only be updated when the StableState objects actually
have one saved.
Bug: chromium:1424238
Change-Id: I8e80a04cd072d90200ca7643de892c0ef29b1f1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297920
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39577}
All tests do this already except for RTCStatsCollectorTest.
Bug: none
Change-Id: I318f45a2c79b3d07ca6c92902ebb4f0622ec3200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297862
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39576}
libaom uses the quantizer as an index for an array of size 64, so
encoder_settings_.qpMax must be <= 63.
Add a comment to LibaomAv1Encoder::SetSvcParams() to explain why the
method doesn't initialize svc_params.layer_target_bitrate.
Bug: None
Change-Id: I26be80de005752214365abbe8b9b32dc976cee0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293680
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39572}
The log_prefix frequently used in dcSCTP is intended to be used
to separate logs from different sockets within the same log output,
typically in unit tests. Every log entry always has the file and
line, so it's not important to add more information to the log prefix
that indicates _where_ it's logged. So those have been removed.
Also, since log_prefix is a string (typically 32 bytes) and it's
never changing during the lifetime of the socket, pass and store it
as a absl::string_view to save memory.
Bug: None
Change-Id: I10466710ca6c2badfcd3adc5630426a90ca74204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274704
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39571}
This removes the behavior of not requesting datachannel if the first
datachannel is closed before the offer is created.
Bug: chromium:1423562
Change-Id: I90eab0f908507e65d9ee3dff51842ee6d61a8aa9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39570}
`CopyPixelsFrom` uses libyuv underneath and has handrolled
implementation for copying with AVX.
Bug: chromium:1424776
Change-Id: I4fafeba97fcc1d2200a10070837672175a1dfc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297800
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Salman Malik <salmanmalik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39567}
Fuchsia's libc provides `select` and `poll` but not `epoll`.
This CL adds a `WaitPoll` method, which is modeled after `WaitSelect` but uses `poll`. The pre-existing `WaitPoll` method was renamed to `WaitPollOneDispatcher`.
TESTED="2p video call on Fuchsia. WaitPoll is faster compared to
WaitSelect, primarily because WaitSelect pessimistically calls
getsockopt(SO_ERROR) on each fd, while WaitPoll does so only on fds that
have entered an error state."
Original author: tombergan@google.com
Bug: None
Change-Id: I83cc824fca40d691fd93712c1c933ff21b3f877c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296826
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39564}
This struct only contains two member variables now and there isn't
much value added by having it.
Low-Coverage-Reason: No change in coverage, CL modifies uncovered RTC_LOG lines.
Bug: none
Change-Id: I924d450f4c8f8e49b1cfeabaebee9fd5235a90cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297360
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39563}
This includes:
* SignalDataChannelTransportWritable_s
* SignalDataChannelTransportReceivedData_s
* SignalDataChannelTransportChannelClosing_s
* Removing sigslot::has_slots<> inheritance from SctpDataChannel
Instead, we use the existing sctp_data_channels_ vector of channels
known to the DCC to deliver the callbacks.
Bug: webrtc:11943, webrtc:11547
Change-Id: I7935d7505856eedf04981b8ba665ef8419166c1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297100
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39557}
Add a WebRTC-specific arg that can be used to control use of targets
that rely on //third_party/google_benchmarks, so the .gni in that
directory can eventually be removed.
Bug: chromium:1404759
Change-Id: I2a9422fae119ca13eb50028d962fc0a671b5fb33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39553}
The goal of the VP9 simulcast project is that when `scalability_mode`
is set, multiple encodings are always interpreted as simulcast, even
if VP9 or AV1 is used. This CL makes this so, but only if the flag
"WebRTC-AllowDisablingLegacyScalability" is "/Enabled/". This allows us
to make "SendingThreeEncodings_VP9_Simulcast" EXPECT VP9 simulcast.
When we are ready to ship we will remove the need to use the field
trial, but before we ship this we'll want to revisit if
SvcRateAllocator can be updated to support simulcast. (Today if we use
SvcRateAllocator when VP9 simulcast is used, all encodings except the
first one get bitrate=0, causing the test to fail because media is not
flowing on all layers.) For now, a TODO is added.
Bug: webrtc:14884
Change-Id: Ie20ae748b0c0405162f3a1b015ab94956ef83dae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297340
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39552}
This removes one sigslot and also simplifies the teardown procedure
of a data channel when the channel is closed by the transport.
In this case we no longer need an additional async teardown task that
releases the last remaining reference to the channel.
Bug: webrtc:11943, webrtc:11547
Change-Id: I1c170349a6cbb3cb3c5a47d284e3a3d416c92b11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296981
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39551}
Ensure a second probe can be sent, after the first probe has been sent, even though no large
media packets have been sent.
This fixes a bug in https://webrtc-review.googlesource.com/c/src/+/294521
This cl also refactor and simplify a bit. Remove the unecessary state kSuspended.
Bug: webrtc:14928
Change-Id: Ia561441ea3d8b648b025eedd0618c82cca03b418
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296882
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39547}
which is displayed nicely in the git webview.
BUG=webrtc:11375
No-Try: True
Change-Id: I2dbe1ef0c74a0de8c5619b522fab39527e797d9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210681
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39545}
This presumably worked before because some libc++ header included it
transitively, but that's no longer the case.
Bug: chromium:1423839
Change-Id: I6ed1c3474c1bfa02084a665c0b9e249484ac50d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297420
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39544}
Chromium has done this in 2021 (https://crrev.com/c/2405530).
This will allow the new BoringSSL to roll into WebRTC (since now
BoringSSL requires the NDK level to be >= 18).
NO_TRY=True
Bug: None
Change-Id: I4b722aef56cb1e189f4df6de64a87ab1e5b620a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297362
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39543}
Encoders that do not support simulcast in the first place does not
expect to have to handle simulcast configurations, and as such may not
necessarily return
WEBRTC_VIDEO_CODEC_ERR_SIMULCAST_PARAMETERS_NOT_SUPPORTED from
InitEncode().
This CL updates EncoderSimulcastProxy to respect this info to avoid
silent errors when LibvpxVp9Encoder (which does not support simulcast)
is attempted to be used in simulcast.
Alternatively we can try to get rid of EncoderSimulcastProxy altogether
since SimulcastEncoderAdapter already has a passthrough mode. A TODO is
added to get rid of the proxy.
Bug: webrtc:14884
Change-Id: Id3703f1768b0aebf617b7d9b935914cd5f1b0f52
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296885
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39541}
Instead there are direct member variables for the various relevant
states, some weren't needed, some can be const but the `id` member
in particular needs special handling and can't be const.
For dealing with the stream id, we now have SctpSid. A class that does range validation, checks thread safety, handles the special `-1` case (for what's essentially an unsigned 16 bit int). Using a special type
for this also has the effect that range checking happens more
consistently (although I'm not modifying the structs in api/).
With upcoming steps of avoiding thread hops, the ID may need to
migrate to the network thread, which the thread checks will help with.
Along the way, update SctpSidAllocator to use flat_set instead of std::set and moving some of the sctp data channel code to the cc file
to help with more accurately tracking code coverage.
Bug: webrtc:11547
Change-Id: Iea6e7647ab8f93052044c5afbcc449115206b4e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296444
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39539}
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.
No functional changes are intended.
Bug: webrtc:14876
Change-Id: Ieb6effd55f0ecba17cefc2f07f5eda1e85dbd016
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296441
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39535}
The test was assuming that after all thee layers have bytesSent > 0 we
would have fully ramped up to the expected resolutions. But there are
reasons why this may not be true, such as if adaptation kicks in.
This CL attempts to de-flake by using kLongTimeoutForRampUp when
checking the resolutions as well.
// Just increasing a timeout...
NOTRY=True
Bug: webrtc:14884
Change-Id: I5ef57ec3e3cc99552c9ae32a6fdf07889ff06ee1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296883
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39534}
It takes several seconds until we get an RTT measurement because that
requires RTCP packets to be received and those are not sent very often.
This CL makes the test faster on average by unblocking it as soon as
we see an RTT measurement (as opposed to always blocking for 10
seconds), this usually unblocks after around 5 seconds.
But to de-flake those rare instances where the test takes more than 10s
to run, the maximum timeout is extended to 20 seconds.
Patch Set 4: also fix use-of-uninitialized value.
Bug: webrtc:14981
Change-Id: Ieca94c90dfb52c3b17584a06660ff66c6462aa8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296822
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39531}