Commit Graph

2824 Commits

Author SHA1 Message Date
Miriam Zimmerman
31a3397e96 Merge remote-tracking branch 'upstream/branch-heads/7778' into mutexlox/webrtc-148
Merge conflicts resolved in:
* api/neteq/neteq.h
* audio/channel_receive.cc
* audio/channel_receive.h
* media/engine/simulcast_encoder_adapter.cc
* modules/audio_coding/BUILD.gn
* modules/audio_coding/acm2/acm_resampler.cc
* modules/audio_coding/acm2/acm_resampler_unittest.cc
* modules/audio_processing/audio_processing_impl.h
* modules/video_coding/BUILD.gn
* p2p/base/p2p_transport_channel_unittest.cc
* pc/jsep_transport_controller.cc
* pc/rtp_transport.h
* pc/rtp_transport_internal.h
* unsafe_buffers_paths.txt
2026-05-08 13:42:18 -04:00
Adel Lahlou
d46d62e9eb Merge remote branch 'upstream/branch-heads/7680' 2026-04-06 00:16:11 -07:00
Evan Shrubsole
9f086f0600 Use RunLoop in test/ tests
Bug: webrtc:469327588
Change-Id: I5306d9aaa98e12522d829f85cd405ce76a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/461341
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47305}
2026-04-01 02:45:52 -07:00
Tommi
443e7ada92 Synchronize final stats collection in E2E quality tests
The PeerConnectionE2EQualityTest framework previously lost final
metrics, such as payload_bytes_received, because it did not wait for
asynchronous RTCStatsCollector::GetStats() calls to complete during test
teardown.

This change ensures all stats are captured by:
- Tracking pending asynchronous requests in InternalStatsObserver
  using a counter and a new IsPolling() method.
- Implementing a synchronization point in the test runner that uses
  the time controller to wait until StatsPoller reports no active
  polling.
- Adding an optional polling delay to StatsPoller to help simulate
  and verify fixes for race conditions in asynchronous stat
  delivery.

Bug: webrtc:481443652
Change-Id: Ie689bdab4843780c765e8ffd2668d63863328026
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/461000
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47295}
2026-03-30 05:24:04 -07:00
Evan Shrubsole
978f78b103 Support custom socket server in test::RunLoop
Puts this to use in stun_server_unittest.

Bug: webrtc:469327588
Change-Id: I66e904cac27c9fafe67c2061650f85996a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460880
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47287}
2026-03-27 08:50:13 -07:00
Evan Shrubsole
2395c1f954 Remove SIMULATED_WAIT
Bug: webrtc:381524905
Change-Id: I24c455d6656412a9ce2e16250564d9986a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460080
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47280}
2026-03-27 03:58:29 -07:00
Sam Zackrisson
989cdaba98 Delete the AEC3 json config fuzzer
The code is test-only nowadays.
Additionally, the JSON parser we use is not robust enough for fuzzing the config: It crashes on deep nesting.

Bug: chromium:440374794, chromium:441805811, chromium:441805815
Change-Id: Icd6daad3dfc500184c5a9dc3dce0bb15815cb516
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457240
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47267}
2026-03-26 06:29:28 -07:00
Erik Språng
0bc96c80f3 Reland "Allow unspecified max allocatable bitrate in VideoSendStreamImpl"
This is a reland of commit e844bd819c

The changes after Patchset 1 are intended to fix a corner case where a
video send stream config is used where layers (simulcast or svc) are
configured and active but have undefined max bitrate. In those cases the
max bitrate will be inherited from the global max bitrate.

Original change's description:
> Allow unspecified max allocatable bitrate in VideoSendStreamImpl
>
> If we have no video the can be enabled, based on the VideoEncoderConfig
> (e.g. the max bitrate is <= 0 or all simulcast streams are
> `active=false`) - let the max bitrate be reported as 0 for the sake of
> bandwidth allocation (MediaStreamAllocationConfig).
>
> Previous to this CL, the above conditions would result in an arbitrary
> value of 10Mbps to use as the max allocation limit. When creating a peer
> connection with audio and video configured but the video disabled/muted,
> that would result in the bandwidth estimator trying to send packet
> trains to probe up to 10Mbps, potentially impacting the network and
> disturbing audio even though we have no need for such as high BWE.
>
> Bug: webrtc:494350649
> Change-Id: Id6353fd93c6170610a790c084d75f3b3c5c3ee97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449100
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#47220}

Bug: webrtc:494350649
Change-Id: I59e415bbd121b8661dc5b53e67a2788a335539a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/459680
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47245}
2026-03-24 10:29:31 -07:00
Evan Shrubsole
2c28168e10 Use GlobalSimulatedTimeController in BasicPortAllocatorTest
This removes uses of SIMULATED_WAIT and AutoThread to boot. Drive by
cleanups of fixing units and removing the realtime test fixing a todo.

Adds a Waiter utility to store WaitUntil settings to reduce code
repetition.

Bug: webrtc:469327588,webrtc:381524905,webrtc:42223992
Change-Id: Idc7cb7d572140aa136fe774715c4c91d6a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457940
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47239}
2026-03-24 01:46:13 -07:00
Per K
c834307dfd Ignore BWE expectations in ScreamTest
ScreamTests are despite running in simulated time not deterministic enough on all platforms and have caused flakiness on try bots.
Therefore, ignore BWE expectations for now unless the flag  --enable-scream-bwe-expectations is set.



Bug: webrtc:447037083
Change-Id: I5a240806603e37952f08f7e900877baa6a6ff3e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/459440
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47236}
2026-03-23 23:57:49 -07:00
Per Kjellander
bc9cf92f3d Revert "Allow unspecified max allocatable bitrate in VideoSendStreamImpl"
This reverts commit e844bd819c.

Reason for revert: Maybe breaks downstream projects

Original change's description:
> Allow unspecified max allocatable bitrate in VideoSendStreamImpl
>
> If we have no video the can be enabled, based on the VideoEncoderConfig
> (e.g. the max bitrate is <= 0 or all simulcast streams are
> `active=false`) - let the max bitrate be reported as 0 for the sake of
> bandwidth allocation (MediaStreamAllocationConfig).
>
> Previous to this CL, the above conditions would result in an arbitrary
> value of 10Mbps to use as the max allocation limit. When creating a peer
> connection with audio and video configured but the video disabled/muted,
> that would result in the bandwidth estimator trying to send packet
> trains to probe up to 10Mbps, potentially impacting the network and
> disturbing audio even though we have no need for such as high BWE.
>
> Bug: webrtc:494350649
> Change-Id: Id6353fd93c6170610a790c084d75f3b3c5c3ee97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449100
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#47220}

Bug: webrtc:494350649
Change-Id: Id3accec77f8bde51c43c3eeb31db68d4f03f7754
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/458722
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47228}
2026-03-23 03:08:01 -07:00
Erik Språng
e844bd819c Allow unspecified max allocatable bitrate in VideoSendStreamImpl
If we have no video the can be enabled, based on the VideoEncoderConfig
(e.g. the max bitrate is <= 0 or all simulcast streams are
`active=false`) - let the max bitrate be reported as 0 for the sake of
bandwidth allocation (MediaStreamAllocationConfig).

Previous to this CL, the above conditions would result in an arbitrary
value of 10Mbps to use as the max allocation limit. When creating a peer
connection with audio and video configured but the video disabled/muted,
that would result in the bandwidth estimator trying to send packet
trains to probe up to 10Mbps, potentially impacting the network and
disturbing audio even though we have no need for such as high BWE.

Bug: webrtc:494350649
Change-Id: Id6353fd93c6170610a790c084d75f3b3c5c3ee97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449100
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47220}
2026-03-20 11:51:26 -07:00
Per K
c63366c187 Allow initial BWE probing with Scream without configured media
Similar to Goog CC, allow padding packets to be sent the first 6s seconds, up to the configured max target bitrate, even if no max allocated bitrate per streams is set.
Probing without media must be allowed.

These "probes" are sent every 3s during the first 6s. Ie, if the initial attempt is aborted due to congestion, a second attempt will be made 3s later.


Bug: webrtc:447037083
Change-Id: I8d32e1ac2eebe5cc84142995d2332ffdc954ecb4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/458300
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47213}
2026-03-20 00:52:13 -07:00
Per K
704c29c12c Attempt to deflake ScreamTest.LinkCapacity2MbpsRtt50msNoEcn
See https://ci.chromium.org/ui/p/webrtc/builders/ci/Linux32%20Debug

Bug: webrtc:483936079
Change-Id: I3839da5e118f1848ac6cf7a38dcd84062ceae797
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/458002
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47202}
2026-03-19 05:26:10 -07:00
Henrik Lundin
438e870e15 Update kMaxPacketBufferSize to support 50ms @ 48kHz in RtpFileReader
Increased kMaxPacketBufferSize from 3500 to 5100 bytes to accommodate
50 ms packets at 48 kHz sample rate (4800 bytes for PCM16) plus the
original 300 bytes of overhead.

Bug: none
Change-Id: Ic89f5bf3883b10c7c97c4584bbc452e0b2b90ee8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457621
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47183}
2026-03-17 09:08:20 -07:00
Evan Shrubsole
210a0991ff Revert "Removed the configuration options for multi_channel processing"
This reverts commit db6adf2e9f.

Reason for revert: Breaks webrtc=>chrome roll https://crrev.com/c/7672366

Original change's description:
> Removed the configuration options for multi_channel processing
>
> This CL removes the explicit configuration options for whether
> the audio processing should be performed in a multi- or
> single-channel manner.
> This change means that the choice of whether to do multi- or
> single-channel audio processing will be made based on the
> content of the audio sent to APM for processing, and the
> audio output requested by APM.
>
> Bug: chromium:464314991
> Change-Id: I55a53f2565c81a7d7ad2e378f944ffcf07c71f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453000
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#47175}

Bug: chromium:464314991
Change-Id: If2888c379fe3a5bfdac6c12225a12705a1377c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457640
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47182}
2026-03-17 07:42:18 -07:00
Per Åhgren
db6adf2e9f Removed the configuration options for multi_channel processing
This CL removes the explicit configuration options for whether
the audio processing should be performed in a multi- or
single-channel manner.
This change means that the choice of whether to do multi- or
single-channel audio processing will be made based on the
content of the audio sent to APM for processing, and the
audio output requested by APM.

Bug: chromium:464314991
Change-Id: I55a53f2565c81a7d7ad2e378f944ffcf07c71f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453000
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47175}
2026-03-16 14:55:44 -07:00
Per K
1ab988ec60 Fix flakiness in ScreamTest.SendVideoOnlyReturnLinkWithBurstLoss
After increasing MSS, BWE rampup is more aggressive.

Bug: webrtc:447037083
Change-Id: Ie1890ec8cfef255a2871b0c71ba32919da7d6a0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/456480
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47149}
2026-03-13 04:48:28 -07:00
Per K
c6d1a824c2 Increase MSS to 1280bytes to increase BWE ramp up speed
This increase how much reference window can grow per update.
It also matches the WebRTC MTU size.


Bug: webrtc:447037083
Change-Id: I7a32915213a2c26e18dbc387e10aa0f9ee6693a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/456246
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47146}
2026-03-13 02:13:45 -07:00
Per K
7fddd93e81 Make scream more resilient to delay spikes
Use the minimum queue_delay from the last two feedback when calculating average queue_delay. This decrease the chance of reducing reference window due to increased delay that is only seen in one feedback.

Also replace usage of queue_delay_dev_norm with DelayBasedCongestionControl::ref_window_scale_factor_due_to_avg_min_delay and DelayBasedCongestionControl::ref_window_scale_factor_due_to_latency_difference
Both are used similarly to the old queue_delay_dev_norm, but are calculated based on the minimum average min queue delay and the average
latency difference per feeedback.

This replace previous:
if (l4s_alpha < 0.0001)
   increment_t *= max(0.1, 1.0 - qdelay_avg / (qdelay_target / 4))
end

Bug: webrtc:447037083
Change-Id: Ic713258b2d0a50b486dc93a89f7c947156d86907
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453300
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47129}
2026-03-12 03:11:11 -07:00
Harald Alvestrand
d4ef54417d Emit CCFB parameters per codec, not wildcard
This works around the inability of some parsers to handle wildcards.

Bug: webrtc:489794442
Change-Id: I4633e1d27139e13ec571bbd169ed38c324922248
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/455280
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47096}
2026-03-10 01:35:52 -07:00
Tommi
06a10bde23 Replace EncoderSwitchRequestCallback with absl::AnyInvocable
This refactoring replaces the EncoderSwitchRequestCallback interface
with absl::AnyInvocable in VideoStreamEncoderSettings.

To ensure the callback survives stream recreation, the callback binding
has been moved to RecreateWebRtcStream, relying on a new `send_channel_`
back-pointer within WebRtcVideoSendStream.

Bug: b/478050997
Change-Id: I1f587d563553c4f2f3d8fd02c4d9ed4473829dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/454480
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47087}
2026-03-09 07:02:19 -07:00
Harald Alvestrand
924dd2ecf8 Reduce the number of webrtc:: prefixes in code
This is achieved by moving most anonymous namespaces inside the
webrtc namespace and modifying as appropriate.

Bug: None
Change-Id: Iff299c45f92ae5aaa736722ed6630df9ad5525bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/454240
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47077}
2026-03-06 06:29:19 -08:00
Danil Chapovalov
68ef77be4d Replace ArrayView with std::span in test/
This change generated using mostly search and replace:
- MakeArrayView replaced with std::span
- ArrayView replaced with std::span
- Run include cleaner
- Removed dependency on array_view target

Bug: webrtc:439801349
Change-Id: Id3b440e8f86559fcb596a7896a62c395fb40496c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/453860
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47068}
2026-03-05 14:47:47 -08:00
Danil Chapovalov
bfc36bfabc Generalize FuzzDataHelper::Read function
To make it easier to use in fuzzers:
- change it not to crash when there is not enough fuzz data left.
- change it to read any trivial object, not just integers

Bug: None
Change-Id: I5dfb47d3accc3c856dfc5d4376676354953d3f27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411660
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47035}
2026-03-03 11:32:11 -08:00
Danil Chapovalov
cc65e24a63 Refactor webrtc fuzzer api
Instead of feeding each fuzzer with pointer + size, provide FuzzDataHelper
class to simplify and unify producing structured fuzz data

Bug: webrtc:42225170
Change-Id: Ide0d02450c685a33c733952a5114a87a20bdbbc6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/411501
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47031}
2026-03-03 07:01:34 -08:00
Harald Alvestrand
aa6e12a248 [Plan B] Remove global deprecation suppression from rtc_test
and apply local markup.

This is part of the transition to ensure all Plan B usage in tests is
explicitly marked.

Modified:
- webrtc.gni: Removed automatic addition of suppress_plan_b_deprecation to rtc_test.
- pc/*_unittests.cc: Added suitable markup
- test/testsupport: Fixed an inappropriately suppressed deprecation

Bug: webrtc:467984837
Change-Id: I18197155d7e521634cd0738357e8504567bbdebd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/452160
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47003}
2026-02-27 01:11:29 -08:00
Danil Chapovalov
b4ba35203b Restrict ArrayView constructor from genertic range
Add constrains matching similar std::span constructor

Update classes that don't fulfill that constraints:
Classes that represent a single range got `begin` and `end` accessors.
Classes that represent more than a single range got single accessor
returning desired ArrayView.

Bug: webrtc:439801349
Change-Id: Ic0e6b4964582d91e0904ef814ce446be5e0ead2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/451220
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46980}
2026-02-24 04:48:22 -08:00
Per K
ede6975505 Remove flaky expectation on RTT in Scream test LinkCapacity100Kbit50msRttNoEcn
Bug: webrtc:447037083
Change-Id: I68551d6ac9492d248bf8a1e0fea6d49ec2c6f2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/451180
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46970}
2026-02-21 08:42:55 -08:00
Per K
b5cb024fe9 Improve Scream on low bitrate
Reduce min_ref_window to 1000 bytes

Use stricter pacing for 15s after last congestion event regardless of event

Remove scaling close to mss since it reduce rampup and adaption speed.

Ensure ref_window_i_ is updated to the ref_window_ before a reduction. Continue to allow it to be changed after every time ref window increase and then decrease.

Bug: webrtc:447037083
Change-Id: I5a6cafa35c09d20b06bb9f05a22d97f687002fde
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449921
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46967}
2026-02-20 10:42:44 -08:00
Harald Alvestrand
d7b28ebba1 Move all the receiver SSRC choices to the AudioChannel/VideoChannel
This makes the mediachannels not have to care about reportig SSRCs,
these are a concern of the RTP/RTCP module and the Channel only.

This allows deleting ~300 lines of code propagating and caching
SSRCs for sending RTCP reports that were following the wrong abstraction.

Bug: webrtc:41480926
Change-Id: I56eee4628011a13613ed8d977f3ef91ea912e4fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442881
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46966}
2026-02-20 10:02:57 -08:00
Erik Språng
33d3cea2ce Add OnFrameDropped stubs for remaining EncodedImageCallbacks.
This adds noop implementations for the `OnFrameDropped` method in all
implementations of EncodedImageCallback in libwebrtc. This in in
preparation of eventually making it pure virtual.

Bug: webrtc:467444018
Change-Id: Ie45255bec2dbe001de9dcab24b0222fee0514738
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/450260
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46958}
2026-02-20 01:29:03 -08:00
Per K
61fd3239f7 Add more detailed logging of ref window increase to analyzer
Bug: webrtc:447037083
Change-Id: Idec75596c20eb01ff169e2526674603e3a5e6092
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449701
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46945}
2026-02-18 07:00:03 -08:00
Harald Alvestrand
8ffca5923a Switch ArrayView, CopyOnWriteBuffer and AudioView to iterators
These functions previously returned a T*, which meant that they
had to be manipulated with pointer arithmetic. Using iterators
gives opportunities for bounds checking.

Bug: webrtc:478086887, webrtc:439801349
Change-Id: If5b91920105b43e72cf0114f003914bd39d145c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449660
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46944}
2026-02-18 06:12:10 -08:00
Erik Språng
71c87155e7 Reland "Move VideoQualityAnalyzer to OnFrameDropped callback."
This is a reland of commit a7c29a690e
Problems seen in previous attempt should be addressed as of
https://webrtc-review.git.corp.google.com/c/src/+/449687

Original change's description:
> Move VideoQualityAnalyzer to OnFrameDropped callback.
>
> This deprecates usage of the EncodedImageCallback::DropReason type,
> which was never actually read anyway, and moves this code to the new
> callback method.
>
> Bug: webrtc:467444018
> Change-Id: I105e44237e6f1bf02bd5664cc6a098a2e734c6e9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449640
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46913}

Bug: webrtc:467444018
Change-Id: Id61ad42cbaf4d1dc00fbe1338f9d3c203837332e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/450040
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46942}
2026-02-18 04:38:55 -08:00
Danil Chapovalov
7a8eed0780 Deprecate ArrayView(nullptr_t, size) constructor
Use default constructor instead.
std::span doesn't have matching constructor.

Bug: webrtc:439801349
Change-Id: Ic228c128835a86296970ef0cfc6cc3af770caaad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/450180
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46941}
2026-02-18 04:32:43 -08:00
Jeremy Leconte
114ea00794 Fix malformed DEPS files in WebRTC.
Bug: webrtc:447469714
Change-Id: I4a18d0d609d175f83942583d36eb7453e2507983
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449981
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46931}
2026-02-17 09:47:27 -08:00
Per K
e56ca1554b Relax expectation in test LinkCapacityIncreaseFrom80KbitTo5MbpsAfter5sVideoCaptureStopedNoEcn
Done to avoid flake on IOS debug.

Bug: webrtc:447037083
Change-Id: Ie880538890fa35319620de22c80c06f67a9ed35d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449840
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46920}
2026-02-17 00:20:36 -08:00
Per K
af4890e347 Add more scream tests
LinkCapacity5MbitRepeatedDelaySpikesNoEcn
Tests BWE when every 200ms link capacity is zero for 100ms.

RampupFastOnLinkCapacity50Mbit20MsRttNoEcn
Tests that BWE ramp up fast on good connections

LinkCapacity100Kbit50msRttNoEcn
Test that BWE can adapt to low capacity without causing to large delay.

LinkCapacityIncreaseFrom80KbitTo5MbpsAfter5sVideoCaptureStopedNoEcn
Test that BWE can ramp up from a low capacity to high capacity  even if the video capturer is stopped as long as video encoding max rate is set.

Bug: webrtc:447037083
Change-Id: I2eaadd46fc9b6a5841696ad0b500f4dbe107aa8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/448120
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46916}
2026-02-16 07:37:50 -08:00
Evan Shrubsole
7522ef394b Add support for main thread socket server in GlobalSimulatedTimeController
This CL updates virtual_socket_unittest accordingly. The goal of this
change is to remove the need for AutoSocketServerThread when simulated
time is used.

Drive by fix all unsafe buffer usages in this test.

Bug: webrtc:469327588,webrtc:381524905
Change-Id: I4297e0efc1e7254294219c372eac7a216a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449121
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46915}
2026-02-16 07:34:59 -08:00
Erik Språng
d5d0f8d60c Revert "Move VideoQualityAnalyzer to OnFrameDropped callback."
This reverts commit a7c29a690e.

Reason for revert: Breaks downstream project.

Original change's description:
> Move VideoQualityAnalyzer to OnFrameDropped callback.
>
> This deprecates usage of the EncodedImageCallback::DropReason type,
> which was never actually read anyway, and moves this code to the new
> callback method.
>
> Bug: webrtc:467444018
> Change-Id: I105e44237e6f1bf02bd5664cc6a098a2e734c6e9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449640
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46913}

Bug: webrtc:467444018
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I7630db5a5e46d320d0d1e385bede09570533ca0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449720
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46914}
2026-02-16 06:23:49 -08:00
Erik Språng
a7c29a690e Move VideoQualityAnalyzer to OnFrameDropped callback.
This deprecates usage of the EncodedImageCallback::DropReason type,
which was never actually read anyway, and moves this code to the new
callback method.

Bug: webrtc:467444018
Change-Id: I105e44237e6f1bf02bd5664cc6a098a2e734c6e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449640
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46913}
2026-02-16 05:19:15 -08:00
Danil Chapovalov
d9ace3fe41 Deprecated ArrayView::subview
Replace remaining usages of subview with subspan

Bug: webrtc:439801349
Change-Id: I205a7de55c24b2f77356095ee736d7863c70c2ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449360
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46908}
2026-02-16 02:40:46 -08:00
Mirko Bonadei
60c186265f Fork Chromium's TestStatusReporter to avoid a dependency on //base.
This CL forks org.chromium.test.reporter.TestStatusReporter to prevent
WebRTC from taking a dependency on Chromium's //base. Since [1],
Chromium's TestStatusReporter started to depend on //base for logging.

[1] - https://chromium-review.googlesource.com/c/chromium/src/+/7555110

Bug: None
Change-Id: I921b6cc90ed1c1101724fa120e77eb103ff793ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/448902
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46901}
2026-02-13 12:38:31 -08:00
Victor Hugo Vianna Silva
e27b7b67aa Remove reference to catapult's github repository
That repo was archived. Prefer using the corresponding chromium URL.

Bug: None
Change-Id: I5dcc18641a463c91da9aa06150a96d206380ecba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/449120
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46899}
2026-02-13 09:37:23 -08:00
Harald Alvestrand
a7e7130d51 Deprecate the two-argument Buffer constructor
The two-argument Buffer constructor could create uninintialized data.
This refactor replaces it with CreateUninitializedWithSizeAndCapacity.

It also refactors the CopyOnWriteBuffer class to use explicit functions when creating uninitialized Buffers.

Also do some checking to ensure that SetData() always has room enough.

Bug: webrtc:42223681
Change-Id: I160c88ca41944c9888d7862e8ce46cd673417a69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/445040
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46890}
2026-02-13 02:40:23 -08:00
Jeremy Leconte
8485ffd580 Add network queue to the schedulable network.
Also remove SimulatedNetworkNode::Build that takes a NetworkEmulationManager as argument. It was added 6 years ago but was never used.

Change-Id: Ieb02304f45e31feb321e92e068aee5ecd6e8e141
Bug: b/482318882
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446880
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#46869}
2026-02-11 04:49:08 -08:00
Evan Shrubsole
3d19cb9da8 Use clock from Environment in direct_transport
Bug: webrtc:42223992
Change-Id: I4c78ad18ba679224da19edba4446710b6a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46843}
2026-02-09 02:38:18 -08:00
Evan Shrubsole
eee78e7541 Reland "Use Clock in internal EventTracer"
This is a reland of commit ed6507b57e

Reland safe: Use comment to deprecate rather than annotation

Original change's description:
> Use Clock in internal EventTracer
>
> This requires changes to X11 capturers due to a poorly defined macro in
> X11. 
>
> Bug: webrtc:42223992
> Change-Id: If9f8102386dc93142f9facfba21deb1f6a6a6964
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/445903
> Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46819}

Bug: webrtc:42223992
Change-Id: Ied9d07950cd35f132c17c3532581b5197a0fbfb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446780
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46832}
2026-02-06 09:48:09 -08:00
Tomas Gunnarsson
3f4d30b193 Revert "Use Clock in internal EventTracer"
This reverts commit ed6507b57e.

Reason for revert: Hit problems in the chromium roll:
[62113/82444] CXX obj/remoting/host/remoting_me2me_host_static/remoting_me2me_host.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/remoting/host/remoting_me2me_host_static/remoting_me2me_host.o.d -DREMOT...(too long)
../../remoting/host/remoting_me2me_host.cc:2201:22: error: 'SetupInternalTracer' is deprecated: use SetupInternalTracer(const Environment&, bool) [-Werror,-Wdeprecated-declarations]
 2201 |     webrtc::tracing::SetupInternalTracer();
      |                      ^
../../third_party/webrtc/rtc_base/event_tracer.h:84:3: note: 'SetupInternalTracer' has been explicitly marked deprecated here
   84 | [[deprecated("use SetupInternalTracer(const Environment&, bool)")]]
      |   ^
1 error generated.
exit=1
error: cannot make progress due to previous 1 errors: exit=1


Original change's description:
> Use Clock in internal EventTracer
>
> This requires changes to X11 capturers due to a poorly defined macro in
> X11. 
>
> Bug: webrtc:42223992
> Change-Id: If9f8102386dc93142f9facfba21deb1f6a6a6964
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/445903
> Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46819}

Bug: webrtc:42223992
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Icef9acd1413e9490fb5203fa607379404ace2d68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446760
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#46825}
2026-02-05 22:57:13 -08:00