Commit Graph

167 Commits

Author SHA1 Message Date
Fredrik Solenberg
68f867ee5b Remove WebRTC-RtcEventLogEncodeDependencyDescriptor field trial
Bug: webrtc:42225280
Change-Id: Ieafe836ff7c69cefa5d860abb4abb617d5bf4dd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/456500
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47171}
2026-03-16 05:34:40 -07:00
Tomas Gunnarsson
c6283a2cfc Revert "Reland "Activate adaptive channel mixing when the echo canceller runs in stereo""
This reverts commit 5ad42502a8.

Reason for revert: broke the chromium roll.

Original change's description:
> Reland "Activate adaptive channel mixing when the echo canceller runs in stereo"
>
> This reverts commit 8c9f8a0fc0.
>
> Reason for revert: The issues in code that this CL relies on have now been addressed and the CL should now work as intended.
>
> Original change's description:
> > Revert "Activate adaptive channel mixing when the echo canceller runs in stereo"
> >
> > This reverts commit 82a3659e11.
> >
> > Reason for revert: Seems to be breaking in chromium:
> > https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks
> >
> > #
> > # Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152
> > # last system error: 2
> > # Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2
> > # 
> >
> > Original change's description:
> > > Activate adaptive channel mixing when the echo canceller runs in stereo
> > >
> > > This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
> > > The mixing is provided by the CaptureRemixer class.
> > > The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
> > > activated.
> > >
> > > Bug: webrtc:42221468
> > > Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
> > > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > > Reviewed-by: Tomas Lundqvist <tomasl@google.com>
> > > Cr-Commit-Position: refs/heads/main@{#46678}
> >
> > Bug: webrtc:42221468
> > Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#46685}
>
> Bug: webrtc:42221468
> Change-Id: I720df6d70de705a1027907d3cd2758d6b569cd75
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444140
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46800}

Bug: webrtc:42221468
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: If52e241869547996452f62aff9baba943f459723
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446340
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46809}
2026-02-04 12:00:21 -08:00
Per Åhgren
5ad42502a8 Reland "Activate adaptive channel mixing when the echo canceller runs in stereo"
This reverts commit 8c9f8a0fc0.

Reason for revert: The issues in code that this CL relies on have now been addressed and the CL should now work as intended.

Original change's description:
> Revert "Activate adaptive channel mixing when the echo canceller runs in stereo"
>
> This reverts commit 82a3659e11.
>
> Reason for revert: Seems to be breaking in chromium:
> https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks
>
> #
> # Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152
> # last system error: 2
> # Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2
> # 
>
> Original change's description:
> > Activate adaptive channel mixing when the echo canceller runs in stereo
> >
> > This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
> > The mixing is provided by the CaptureRemixer class.
> > The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
> > activated.
> >
> > Bug: webrtc:42221468
> > Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Tomas Lundqvist <tomasl@google.com>
> > Cr-Commit-Position: refs/heads/main@{#46678}
>
> Bug: webrtc:42221468
> Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46685}

Bug: webrtc:42221468
Change-Id: I720df6d70de705a1027907d3cd2758d6b569cd75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444140
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46800}
2026-02-03 23:14:39 -08:00
Markus Handell
4a51622705 TaskQueueFactory: Add kAudio and kVideo priorities
This change introduces specific priority levels for audio and
video tasks within the TaskQueueFactory to allow for better
platform-specific thread scheduling.

Changes:

* New field trial WebRTC-MediaTaskQueuePriorities that activates the
  priority change.

* New Priority Enums: Added kVideo and kAudio to
TaskQueueFactory::Priority and corresponding kVideo and
kAudio to ThreadPriority.

* WebRTC platform thread implementation:
- Video priority initially maps to high priority.
- On Mac/iOS (GCD), both audio and video map to
  DISPATCH_QUEUE_PRIORITY_HIGH because of API limitation.

* Task queue updates:
- Updated the audio encoder queue to use kAudio priority.
- Updated the video encoder & decoder, incoming video
  stream, and video frame transformer queues to use kVideo priority.

* Queue renaming: Standardized several task queue names by
   appending "Queue" (e.g., "AudioEncoder" became "AudioEncoderQueue").

Bug: chromium:470337728
Change-Id: I4790990340a72a54945750c2c4e1f97314edf375
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/436580
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46744}
2026-01-26 06:18:27 -08:00
Sameer Vijaykar
0fc5aeecfb Reduce network cost for cellular network slices.
This change makes network slices on cellular networks more preferable
than the regular network by decreasing the network cost slightly when a
slice is in use.

Network slicing is typically offered as a premium feature on 5G networks
at an additional price.

The network cost is only reduced when the underlying adapter supports
slicing, currently 5G or undifferentiated cellular. It is gated behind
the WebRTC-UnifiedCommunications field trial.

BUG=webrtc:466507512

Change-Id: I230264c95d2d9f0386a096e7ca51cf44b5684922
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442681
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#46710}
2026-01-21 14:41:45 -08:00
Tomas Gunnarsson
8c9f8a0fc0 Revert "Activate adaptive channel mixing when the echo canceller runs in stereo"
This reverts commit 82a3659e11.

Reason for revert: Seems to be breaking in chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks

#
# Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152
# last system error: 2
# Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2
# 

Original change's description:
> Activate adaptive channel mixing when the echo canceller runs in stereo
>
> This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
> The mixing is provided by the CaptureRemixer class.
> The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
> activated.
>
> Bug: webrtc:42221468
> Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Tomas Lundqvist <tomasl@google.com>
> Cr-Commit-Position: refs/heads/main@{#46678}

Bug: webrtc:42221468
Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46685}
2026-01-18 16:23:29 -08:00
Per Åhgren
82a3659e11 Activate adaptive channel mixing when the echo canceller runs in stereo
This CL activates adaptive channel mixing when the echo canceller runs in stereo mode.
The mixing is provided by the CaptureRemixer class.
The adaptive mixing is activated behind a finch-based kill-switch that allows it to be
activated.

Bug: webrtc:42221468
Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#46678}
2026-01-16 11:22:51 -08:00
Jesús de Vicente Peña
77a2933999 Remove WebRTC-UseNtpTimeAbsoluteSendTime field trial
The WebRTC-UseNtpTimeAbsoluteSendTime field trial has been enabled by default for a while now and can be cleaned up. This commit removes the field trial from experiments/field_trials.py and hardcodes the behavior in RtpSenderEgress.

Bug: webrtc:42226305
Change-Id: I15103cec73e7c7e3399d2fad3e79291cf1f888af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/440101
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46630}
2026-01-12 06:03:33 -08:00
Erik Språng
d298d37941 Add field trial for corruption detection FrameSelector
This cl adds a field trial `WebRTC-CorruptionDetectionFrameSelector`
and a utility class for parsing the configured time spans.

Bug: webrtc:358039777
Change-Id: I6b997a0ed63168d803375d931a8ebe601e763b1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/441022
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46603}
2026-01-09 10:50:18 -08:00
Gustaf Ullberg
c058d04875 Experiment for maximum speech level
Bug: webrtc:457791164
Change-Id: Ib666cb5453ee17c5067fac9b988772e3b39146a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433160
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46458}
2025-12-11 08:46:44 -08:00
Joachim Reiersen
340cd052c8 Cleanup field trial WebRTC-StunInterPacketDelay
Appears unused as no one is reading the weak_transport_interval_ var in
P2PTransportChannel. This looks like a bug, so we should either clean it
up, or pass it into the IceConfig ctor where kWeakPingInterval is used
as the default.

For now proposing to clean it up unless there is downstream usage.

Bug: webrtc:42221607
Change-Id: Ic2c559e68f9fc799f75da6599856528c9dface8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/427500
Commit-Queue: Joachim Reiersen <joachimr@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46313}
2025-11-25 06:46:37 -08:00
Gustaf Ullberg
f374ae622e Experimental Speech Level Estimator
This CL adds a new (experimental) speech level estimator to AGC2. The
goal is make the AGC less likely to adapt to (and boost) background
noise.

Bug: webrtc:457791164
Change-Id: I425d72790b2e1dd993ffb7530c02b0485a80f4e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/422966
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46143}
2025-11-06 07:02:36 -08:00
Per Åhgren
1dfd30cf31 Reland "Switch to use 32 kHz processing inside APM"
This reverts commit ddb627e555.

Reason for revert: The downstream tests causing the breaking of the Chromium roll are now addressed. 

Original change's description:
> Revert "Switch to use 32 kHz processing inside APM"
>
> This reverts commit 179be29133.
>
> Reason for revert: Broke Chromium roll.
>
> Error: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/2423056/overview
>
> Original change's description:
> > Switch to use 32 kHz processing inside APM
> >
> > This CL switches to using 32 kHz processing internally inside WebRTC APM
> > to avoid using the current 3-band split filter which has been shown to
> > have issues with aliasing impacting the speech quality.
> >
> > The intention is to revert this change once the issues in the 3-band
> > split filter have been addressed.
> >
> > Bug: webrtc:454695115
> > Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#46026}
>
> Bug: webrtc:454695115
> Change-Id: I599adf846217f0cb81588e84f541277465ef856a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420580
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46037}

Bug: webrtc:454695115
Change-Id: Ic0bb60b8c7103c7eac9563bae2d06935c152764e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420463
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46046}
2025-10-27 09:02:42 -07:00
Harald Alvestrand
ddb627e555 Revert "Switch to use 32 kHz processing inside APM"
This reverts commit 179be29133.

Reason for revert: Broke Chromium roll.

Error: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/2423056/overview

Original change's description:
> Switch to use 32 kHz processing inside APM
>
> This CL switches to using 32 kHz processing internally inside WebRTC APM
> to avoid using the current 3-band split filter which has been shown to
> have issues with aliasing impacting the speech quality.
>
> The intention is to revert this change once the issues in the 3-band
> split filter have been addressed.
>
> Bug: webrtc:454695115
> Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#46026}

Bug: webrtc:454695115
Change-Id: I599adf846217f0cb81588e84f541277465ef856a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/420580
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46037}
2025-10-26 02:39:02 -07:00
Per Åhgren
179be29133 Switch to use 32 kHz processing inside APM
This CL switches to using 32 kHz processing internally inside WebRTC APM
to avoid using the current 3-band split filter which has been shown to
have issues with aliasing impacting the speech quality.

The intention is to revert this change once the issues in the 3-band
split filter have been addressed.

Bug: webrtc:454695115
Change-Id: Id87e7f8d2ba37a915b3640f7eeb5c996037c59aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/419860
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46026}
2025-10-24 03:05:28 -07:00
Henrik Boström
c42c5a1e64 Cleanup flag WebRTC-RTP-Lifetime, experiment launched successfully.
This feature has been Stable for 2 weeks meaning we did not have to kill
switch it. Delete the flag such that the only valid code path is that
this feature is enabled.

Bug: chromium:440975167
Change-Id: I8f83ee3962dc5dc8fae565c20cce92be7bb3266e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/416540
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45933}
2025-10-14 02:52:28 -07:00
Erik Språng
3a2bd6e66a Add EncoderSpeedExperiment field trial helper class.
This CL adds a helper class to simplify parsing of the
WebRTC-EncoderSpeed field trial string, which specifies the
encoder complexity to use per codec and camera/screenshare permutation.

Bug: webrtc:443906251
Change-Id: I2a89e9149b8583b117e448e2dd3e9cf309729bb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/414401
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45854}
2025-10-07 07:29:02 -07:00
Philipp Hancke
ff084da0f5 Improve validation of SDP direction in remote description
enabled by default and guarded by the killswitch
  WebRTC-EnforceTransceiverDirection

Bug: chromium:448408148
Change-Id: I15e98d371d1b398aff4b9cb88bf34a483b36fe1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/413340
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45847}
2025-10-07 02:42:03 -07:00
Per K
d2b4a7fa82 Implement ScreamV2
Based on RFC draft:
https://datatracker.ietf.org/doc/draft-johansson-ccwg-rfc8298bis-screamv2/

This is the first part and implements logic for increasing reference window.


Bug: webrtc:447037083
Change-Id: Ic9280359a350ff8cacc08ef0bc6118ee8bfa31cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/412960
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45804}
2025-10-02 05:18:42 -07:00
Jeremy Leconte
5b92d51e8b Make KeepSorted happy
This is the only keep sorted usage in WebRTC, let's make the analyzer happy with it.

Bug: b/446606314
Change-Id: I0b086eb4cc9581e6b6f63d88466ae27e209a9851
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/413000
Auto-Submit: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45786}
2025-10-01 02:21:06 -07:00
Philipp Hancke
73282ed449 snap: guard with field trial
The field trial name is
  WebRTC-Sctp-Snap

This prevents it from being enabled by default until it is ready
and has at least a submitted IETF draft

Bug: webrtc:426480601
Change-Id: I3de79ce60c70d74774fa30f9c174987889a66f25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/397381
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#45735}
2025-09-25 00:49:45 -07:00
Erik Språng
6db6f177d3 [AV1] Drop repeat frames on enhancement layers.
This CL introduces a field trial which allows the libaom AV1 encoder
wrapper to drop frames if the input frame is repat frame and the
scalabilit controller assigns it a non-base layer.

Bug: webrtc:445115234
Change-Id: I56692808c07251c01136b2246b5ee3bf7c7bfeda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409564
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45712}
2025-09-23 05:24:33 -07:00
Jonas Oreland
794b74e21f Add field trial WebRTC-SynchronousDestructors for synchronous destructor
And implemented it for destruction of MediaEngine in ConnectionContext.

Having it as a PostTask means that it can happen arbitrarely
later...if worker thread is loaded...which it can be, in some
apps. The asynchronous destruction of MediaEngine means
that audio "data" can flow through the system even
after the destructor of PeerConnectionFactory has been
run.

Work in progress doc: https://docs.google.com/document/d/1tZHCWfCjIFtPHtm_tg9hAksHJ-JOurASckv4k-aJInw/edit?usp=sharing

And related bug: webrtc:14449

Bug: webrtc:443588673
Change-Id: I2d0f117ca13fe166d913d71af1ba1e6ff8598b63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408745
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45633}
2025-09-12 02:15:39 -07:00
Harald Alvestrand
a81f50de17 Implement remembering HeaderExtensionsToNegotiate
This changes HeaderExtensionsToNegotiate to remember the result
of the last negotiation.

Corresponding spec change: https://github.com/w3c/webrtc-extensions/pull/238

Bug: webrtc:439514253
Change-Id: I420b65f252398b1bb72d1938c48dc548ec18fd60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404946
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45493}
2025-08-29 16:10:56 -07:00
Per K
a3294ca4e0 Cleanup field trial WebRTC-SetReadyToSendFalseIfSendFail
No issues with the fix has been reported, thus cleanup the killswitch.

Bug: webrtc:361124449
Change-Id: Id7ed12e1bfa03e835b47cc86316553d8b2f9b153
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406540
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45449}
2025-08-27 02:44:23 -07:00
Henrik Boström
59f9ca8c73 Make inbound-rtp stats object lifetime spec-compliant (behind flag).
When field trial "WebRTC-RTP-Lifetime" is enabled, the creation of the
inbound-rtp stats object is delayed until the first packet is received.
- This aligns with spec and Firefox behavior.

To aid testing, PeerConnectionTestWrapper has new negotiation methods
added to give the test more control without having to write a lot of
boilerplate code.

(A separate CL will deal with outbound-rtp which, while the plan is
they continue to be created before first packet is sent, should be
delayed until after O/A has completed.)

Bug: chromium:406585888
Change-Id: Ibac2128e80e0153659b68cc0f00869e5d1f27a69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/405740
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45428}
2025-08-25 22:05:18 -07:00
Philipp Hancke
8e8480de52 Calculate video encode PSNR (in supported codecs)
the Y, U and V components, applications can do a weighted average.

https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-psnrsum

Depends on
  https://github.com/cisco/openh264/pull/3824 (for OpenH264)
  https://chromium-review.googlesource.com/c/webm/libvpx/+/6167966 (libvpx)
  https://aomedia-review.googlesource.com/c/aom/+/196501 (libaom)

This CL implements the codec changes,
  https://webrtc-review.googlesource.com/c/src/+/375021
is a follow-up to wire up getStats.

BUG=webrtc:388070060

Change-Id: I7046158a7b6e4183a9ec939fcac94eee9d65530d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368960
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45312}
2025-08-08 12:01:28 -07:00
Philipp Hancke
5e8d17b3c4 sdp munging: remove WebRTC-NoSdpMangleNumberOfContents killswitch
since
https://chromiumdash.appspot.com/commit/5edfd244fed9a339f6279cdccb4d57d0c6749b21
shipped in M138

Bug: webrtc:416088632,webrtc:40567530
Change-Id: I5d234e5e1d5a48e5372ce1ec439e48f08dd2fe05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402911
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#45293}
2025-08-05 11:38:08 -07:00
Per Kjellander
5298f72f97 Revert "Refactor class SendSideBandwidthEstimation"
This reverts commit c432ba14db.

Reason for revert: Investigate downstream test breakage - b/429391976

Bug: webrtc:423841921, webrtc:42222445
Original change's description:
> Refactor class SendSideBandwidthEstimation
>
> The goal is to make states more clear and be able to log where a certain decision come from.
> In this cl:
>  - loss bases BWE handling moved to separate files
>  - remove field trial WebRTC-Bwe-ReceiverLimitCapsOnly
>
> Bug: webrtc:423841921, webrtc:42222445
> Change-Id: I502bee094e18606f8a188214fafa421a868023ca
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396342
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#45056}

Bug: webrtc:423841921, webrtc:42222445
Change-Id: I8dcda24877dd8b1fbab4e1bb5235e2e7b903dabf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/399080
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45088}
2025-07-03 10:32:40 -07:00
Per K
c432ba14db Refactor class SendSideBandwidthEstimation
The goal is to make states more clear and be able to log where a certain decision come from.
In this cl:
 - loss bases BWE handling moved to separate files
 - remove field trial WebRTC-Bwe-ReceiverLimitCapsOnly

Bug: webrtc:423841921, webrtc:42222445
Change-Id: I502bee094e18606f8a188214fafa421a868023ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396342
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45056}
2025-07-01 03:16:19 -07:00
Philipp Hancke
84d07a37d9 munging: add field trial to control when to throw
WebRTC-NoSdpMangle/Enabled,1,2,83/
allows for finch rollout of restrictions without requiring a code change to turn off low-usage munging.

  WebRTC-NoSdpMangleForTesting/Enabled,1,2,83/
will reject any modification by default unless it is part of the
comma-separated list of exceptions. This allows for proactive deactivation and adding E2E tests.

Bug: chromium:40567530
Change-Id: If57602089dcc3e9372044b37996ec4c468fdd0cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/395340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#44981}
2025-06-19 06:24:12 -07:00
Per K
17eec85a9f Stop using stable_rate from GoogCC
Removed from
- AudioEncoderOpus
- BitrateAllocator

stable_target rate in GoogCC is not used for anything except as a stable rate for opus. In order to simplify GoogCC, it will be be deprecated since it does not work that well in loss limited network scenarios.

Bug: webrtc:423841921
Change-Id: I6356ab4f11542816b6200cbb055d1a98ecebad74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396740
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44961}
2025-06-17 07:51:15 -07:00
Markus Handell
8f7c0aa402 FrameCadenceAdapter: remove unused field trials.
The feature is mature enough that we don't need these kill switches
and field trials anymore.

Bug: chromium:40200151
Change-Id: I0344a42c8637034226925bc95f1eda10c69df977
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396801
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44959}
2025-06-17 04:55:40 -07:00
Per K
a350cfe092 Remove StableTargetRateExperiment and usage of TargetTransferRate.stable_target_bitrate from Video allocation and encoder
TargetTransferRate.stable_target_bitrate is planned to be deprecated since it is mostly unused and does not currently work well in networks limited by packet loss.

Bug: webrtc:42220156, webrtc:423841921
Change-Id: Ib2a0321a6771974e679ec9a0da16e175a554ccc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396720
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44953}
2025-06-17 02:15:53 -07:00
Rasmus Brandt
9d0ec0bbfa Add support for field trial-based parameterization of TimestampExtrapolator.
* Add overrides for existing parameters.
* Add new covariance update feature, gated behind bool parameter.

Bug: b/422493053, b/423502613
Change-Id: I61b5ec655f74de629e36ba00ca446b3d887f0308
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396220
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44930}
2025-06-13 13:40:13 -07:00
Per Kjellander
123e168e24 Delete LossBasedBweV1 since LossBasedBweV2 is per default enabled
Bug: webrtc:42222865
Change-Id: If0ca88d91473c15b2a704aca6eb96dd5c92cf3d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/395960
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44869}
2025-06-10 04:29:44 -07:00
Danil Chapovalov
737e0fd106 Cleanup reference to WebRTC-Audio-FecAdaptation field trial
Field trial itself was already cleaned up from the code

Bug: webrtc:42233254
Change-Id: I5a8c842eea84f1e210c38aa9bc7f5b7deccab310
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/393200
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44739}
2025-05-23 00:07:31 -07:00
Lionel Koenig Gélas
6ffc178f12 Add a PostFilter to compensate processing shortcomings
Bug: webrtc:417439718
Change-Id: Iaea63c6cbd7d5ae556fa0371e68ed7b4ea32b16f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391864
Reviewed-by: Per Åhgren <peah@webrtc.org>
Auto-Submit: Lionel Koenig <lionelk@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44726}
2025-05-21 23:58:40 -07:00
Jonas Oreland
50544d8dc4 WebRTC/PQC
Add EphemeralKeyExchangeCipherGroups to CryptoOptions.

BUG=webrtc:404763475

No-Iwyu: Doesn't seem to understand the #ifdef surrounding open/boring ssl
Change-Id: I187e5d9b4da4f1494980a8fc257fabcfcc77b2ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/390000
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44532}
2025-05-07 03:15:37 -07:00
Philipp Hancke
5edfd244fe sdp munging: forbid removing a content with SDP munging
This is now disabled by default, guarded by
  WebRTC-NoSdpMangleNumberOfContents
which can be disabled if necessary.

BUG=webrtc:40567530

Change-Id: I02a3d4d21678f41e0910144be1aa159828c40757
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/387560
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#44517}
2025-05-05 10:33:08 -07:00
Sergey Silkin
9b272274b8 Prevent encoder switch on unaligned resolution
Return NO_OUTPUT instead of ERROR from Encode() if input resolution doesn't satisfy required alignment.

Bug: webrtc:415329365
Change-Id: If2d4794b1ffd68819744157a3b15c2613b90a047
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/389561
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44513}
2025-05-05 03:01:39 -07:00
Tom Van Goethem
84e40071f9 Restrict certain addresses to be used when SDP munging is enabled
Gated behind the default-empty list of restricted addresses tracked by
the field trial WebRTC-NoSdpMangleUfragRestrictedAddresses.

Bug: b/409713509
Change-Id: Iabb5c8b5307c66215635336bee55f7bfbd040f3b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/388340
Auto-Submit: Tom Van Goethem <tov@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44477}
2025-04-28 22:17:04 -07:00
Harald Alvestrand
72d6d748dd Disallow SDP munging if it modifies the ICE ufrag.
Gated behind default-disabled field trial WebRTC-NoSdpMangleUfrag

Bug: b/409713509
Change-Id: I48e307ef3ca65b463dde8bcb24ae5252cd6fdf58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/385721
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44360}
2025-04-11 03:59:07 -07:00
Per K
649820842f Cleanup unused field trial WebRTC-Bwe-PaceAtMaxOfBweAndLowerLinkCapacity
Bug: webrtc:42220543
Change-Id: I7c4551fbdf68e52391c7ba02ca73c216ec6c5137
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/385160
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44333}
2025-04-08 05:54:02 -07:00
Philipp Hancke
dae879ac73 Add field trial for enabling DTLS PQC in WebRTC
which allows testing DTLS-in-STUN for forward-compatibility and
evaluate the general readyness. This change is guarded under the
field trial
  WebRTC-EnableDtlsPqc

The code is modelled after Chromiums ssl_client_socket_impl:
  https://source.chromium.org/chromium/chromium/src/+/main:net/socket/ssl_client_socket_impl.cc;l=646

See also
  https://github.com/w3c/webrtc-extensions/issues/207

BUG=webrtc:404763475

Change-Id: Ibede93045cafd42b6304b1c040fbf3bd74fa601e
No-Iwyu: IWYU gets confused by defines
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/381681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44279}
2025-04-02 04:23:15 -07:00
Danil Chapovalov
e9e9ab4f30 Remove TaskQueue-ReplaceLibeventWithStdlib from registered field trials
TaskQueueLibevent is replaced, field trial has no effect.

Bug: webrtc:42224654, webrtc:42221607
Change-Id: I3a180275559fa4f7919a8f9f3f2e16186c6381b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/383501
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44270}
2025-03-31 10:07:01 -07:00
Sergey Silkin
2f64c71ae6 Add field trial to control cropping in dav1d wrapper
When WebRTC-Dav1dDecoder-CropToRenderResolution is enabled (default),
crop decoded frame down to render resolution.

Bug: webrtc:405341160
Change-Id: I230774fd7e2a830278a0efe39c9668e25d3144b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/382241
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44197}
2025-03-24 03:10:30 -07:00
Olov Brändström
64e4714281 Add field trial that change g2g metric to use abs. capture time.
G2G (glass to glass) latency metric uses RTP timestamps to estimate the metric. The RTP timestamps are converted to senders NTP time using data from Sender Reports. This work fine in most cases, but not when Virtual Video SSRCs are used.

This field trail changes the G2G metric to use the absolute capture time header extension to get senders NTP timestamp. This is designed to work with Virtual SSRCs, and is currently used for audio end to end latency metric.

Enables this should improve G2G latency metric calculations with VVSSRCs , and create the same results in other cases. It should not create any other side effects. The feature is hidden behind the flag so we can make sure that's the case as we roll this out.

Bug: webrtc:401512883
Change-Id: I7a75d0a430f1fd1bcd79d9a228a7429300d5fafe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/380421
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#44126}
2025-03-14 05:24:05 -07:00
Henrik Boström
762d77ef82 Revert the deletion of WebRTC-VideoH26xPacketBuffer flag.
This unlaunches the experiment for H264 due to issues reported for H264
where the old packet buffer behaves better than the new one. A recently
introduced issue will be fixed separately from this CL and rollout
restarted.

This CL is not a clean revert though (see delta with PS#1):
we will continue to use the H26xPacketBuffer for the new codec H265
because it does not work with the old packet buffer anyway.

Bug: webrtc:41480904
Change-Id: Icac49fa70f1c78d1ed596a7838d1417f6588a8b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/380861
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Jianlin Qiu <jianlin.qiu@intel.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44104}
2025-03-12 07:54:16 -07:00
Henrik Boström
8a9e08ba23 Add QP threshold experiment for H265.
The old experiment WebRTC-Video-QualityScaling only applies for VP8,
VP9, H264 and Generic, which does not cover H265.

In order to fine tune QP thresholds for H265, a new field trial is
added, this allows us to experiment with those without affecting the
old field trial which has a bunch of existing dependencies.

Some drive-by comments are added to the existing code.

Bug: webrtc:402154973, chromium:391907171
Change-Id: I13c8b496a1c708528d7538c8d1d2ff66de4c2ae5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/380420
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44088}
2025-03-11 06:07:17 -07:00