43182 Commits

Author SHA1 Message Date
Per K
70b65bc375 Remove deprecated ReceiveSideCongestionController ctor
Bug: webrtc:4222080842220808
Change-Id: I96dec60d98eaea4b96e081ee5a6340649836565d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376340
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43850}
2025-02-05 05:28:11 -08:00
Danil Chapovalov
3164c2a4eb Restructure PeerConnection tests not to create PortAllocator directly
Instead rely on PeerConnectionFactory to create it.

Bug: webrtc:42232556
Change-Id: I24c9842ef027604b840188306db3e29756e1925f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376280
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43849}
2025-02-05 04:08:12 -08:00
webrtc-version-updater
e46d8e4ec4 Update WebRTC code version (2025-02-05T04:02:29).
Bug: None
Change-Id: Ib5da5a8bf50c02314bfd125d4366fa42e943404f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376320
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43848}
2025-02-04 21:32:56 -08:00
Danil Chapovalov
b1ec813339 Expose direct access to PeerConnection in PeerConnectionWrapper helper
Multiple derived classes duplcated that code, and one more fixture
can benefit from the same direct access to avoid saving reference to port allocator

Cleaned includes and build dependencies on the way, in particular left single build target that contains peer_connection_wrapper

Bug: webrtc:42232556
Change-Id: Ieb3d5449f3a0285230847716e33fb3b2d1b47882
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376300
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43847}
2025-02-04 10:46:11 -08:00
Philipp Hancke
e828c6dba3 red: remove hardcoded parameters in favor of taking them from the codec
and make it less opus-specific.

BUG=None

Change-Id: I6fe2975ba6e45a3758fedc5b950de90e8d9df362
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375436
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43846}
2025-02-04 10:28:30 -08:00
Takuto Ikuta
9c56cb3eda Add include for <optional>
This is to fix build error when we set use_libcxx_modules=true in
chromium.

Bug: chromium:40263312
Change-Id: I7dd87e43823f33f70c6c8e15f4c64df7d231f021
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376003
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43845}
2025-02-03 11:54:34 -08:00
Henrik Boström
0533b5eafe Add set_timestamp() method to RTCStats.
Useful for when creating aggregate stats objects, seems like an
oversight that we don't have it already.

Bug: None
Change-Id: Ied36afd2122464a81c7d725825353f9af59fe632
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376220
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43844}
2025-02-03 08:07:11 -08:00
Jeremy Leconte
9cc5bc8499 Remove rust dependency on android.
This was needed because Android builds depended on chromium base which is not the case anymore.

Bug: None
Change-Id: I0de26ff61fe105c68a6d60def291c542f4b65a70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376240
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43843}
2025-02-03 07:05:56 -08:00
Victor Hugo Vianna Silva
a6f35491d6 [cpp23] Remove use of std::aligned_storage in webrtc
std::aligned_storage is deprecated in C++23, see linked bug. The only
webrtc usage (VoidUnion::inline_storage) employed the default Align
parameter (i.e. std::aligned_storage<Len>, not std::aligned_storage<Len,
Alignment>), which is defined as the largest alignment <= Len.

This patch replaces the usage with a char buffer of same size and
alignment alignof(std::max_align_t). In theory, this might increase
alignment and use more memory. In practice, local testing in my
machines showed no behavior change, since Len =
kInlineStorageWords * sizeof(uintptr_t) = 32 > 16 (maximum alignment
on linux x86_64) > 8 (maximum alignment on mac arm64).


Bug: chromium:388068052
Change-Id: If08b69f7a5ff7b716a66c8703e31eb5d4de14431
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373800
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43842}
2025-02-03 07:04:52 -08:00
Henrik Boström
c262375415 Add test for preferring RTX payload to be "primary codec + 1".
Adds test coverage for the following mitigations (need both to pass):
1. https://webrtc-review.googlesource.com/c/src/+/375847
2. https://webrtc-review.googlesource.com/c/src/+/376022

Like the comment says, this is neither mandated by the spec or
guaranteed, but when the number of codecs is quite small like it is in
this test it will be true for all RTX codecs.

Bug: webrtc:360058654
Change-Id: Ib73cea59d06a62390dd039eb2dc04677d6178460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375865
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43841}
2025-02-03 06:11:53 -08:00
Yury Yarashevich
ae24807590 [ObjC] Avoid usage of variable after move in RTCNetworkMonitor.
Allocate std::map in-place and capture pointer to it by Obj-C
lambda.

Bug: None
Change-Id: I285d8b2d10fef9130a5d0e457ad3982ff8a1f00f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375920
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43840}
2025-02-03 05:31:29 -08:00
Yury Yarashevich
f80562d22a [ObjC] Validate and store strong ref to peer_connection before use.
Some methods used a weak peer_connection reference directly,
supposedly causing crashes.
Now, both peer_connection and delegate are captured as
strong references and validated before use for consistency.

Bug: webrtc:393263500
Change-Id: I0ab39acf7097d4c8082d05749b37b6d4998f9aa7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375880
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#43839}
2025-02-03 05:26:54 -08:00
Henrik Boström
b60a5ab91c Choose RTX codec PT in lower range if codec is in lower range
pc1 video mline without this change (and the previous one):
96 97 107 108 109 114 115 116 117 118 119 120 37 121 40 124 98 99 100 101 127 42 43
with this change:
96 97 103 104 107 108 109 114 115 116 117 118 39 40 45 46 98 99 100 101 119 120 121

BUG=webrtc:360058654

Change-Id: I4021daf1c62f0edf9650e12a74619035040291a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376022
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43838}
2025-02-03 04:42:05 -08:00
Yury Yarashevich
1181edda58 [ObjC] Fix strong reference check in RTCNetworkMonitor.
Strong reference must be validated when created from weak reference,
otherwise crashes are possible and actually observed via Crashlytics.

Bug: None
Change-Id: I68355080ba3b20119c913a9c7e27edc07b5447cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375901
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43837}
2025-02-03 04:41:01 -08:00
Yury Yarashevich
6f17d09dd1 [ObjC] Init NSMutableDictionary with capacity.
It make sense to initialize dictionary with capacity to avoid
reallocation during inserting values to dictionary.

Bug: None
Change-Id: Ic3e73b95a36a39dafb89e57d49e89424eb131b4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375960
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#43836}
2025-02-03 03:26:12 -08:00
Danil Chapovalov
34c15bc511 Restructure PeerConnectionBundleTest helper not to create PortAllocator
Instead rely on PeerConnectionFactory to create it.

Bug: webrtc:42232556
Change-Id: If3de8a2e311fcdca4371cca03d10bd383fbd3e01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375922
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43835}
2025-02-03 03:06:13 -08:00
webrtc-version-updater
9830de94e2 Update WebRTC code version (2025-02-01T04:05:45).
Bug: None
Change-Id: I6b48138f72f14d2beb0fa76519bed8ac86ae2d4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376140
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43834}
2025-01-31 22:20:35 -08:00
Philipp Hancke
f68df0b95c Restore primary/rtx payload type assignment logic
Changes the order of payload type assignment to keep the rtx_pt =
primary_pt+1 pattern (even if not required by the specification)

On https://webrtc.github.io/samples/src/content/peerconnection/pc1/ this
changes PTs as follows:

M132: m=video 9 UDP/TLS/RTP/SAVPF 96 97 102 103
104 105 106 107 108 109 127 125 39 40 45 46 98 99 100 101 112 113 114
(121 more lines) mid=1

M134: m=video 9 UDP/TLS/RTP/SAVPF 96 109 99 118 100 119 101 120 103 121
104 122 37 123 40 127 97 114 98 115 107 44 108 (121 more lines) mid=1

M134 with this patch: m=video 9 UDP/TLS/RTP/SAVPF 96 97 107 108 109 114
115 116 117 118 119 120 37 121 40 124 98 99 100 101 127 42 43 (121 more
lines) mid=1

Note that this pushes red and ulpfec into lower range but those codecs
are not widely used and it is possible to get them back into the upper
range e.g. by using setCodecPreferences to disable H264 (where ulpfec is
not supported)

BUG=chromium:391132280

Change-Id: I892f00a2f276728d16c37e8ba5f76d01f6322a7d
No-Iwyu: single include missing, keep it more merge-able
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375847
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43833}
2025-01-31 06:41:50 -08:00
Palak Agarwal
c58a767a23 Reland "Get DeviceScaleFactor for the captured monitor/screen"
This is a reland of commit e20fbb00d0e0219b710da24664e81a10b12c703a
which failed due to CHECK failing on monitor_id in
DxgiDuplicatorController::GetDeviceScaleFactor(). This has now been
fixed in this CL by removing the check for greater than 0 and instead
returning std::nullopt.

Original change's description:
> Get DeviceScaleFactor for the captured monitor/screen
>
> Accesses DeviceScaleFactor using the windows API
> GetScaleFactorForMonitor and adds it to the DesktopFrame. In a follow-up
> CL, this value is propagated to
> DesktopCaptureDevice::Core::OnCaptureResult where it is added to the
> frame metadata.
>
> In a follow-up CL, add RegisterScaleChangeEvent to get notified whenever
> the device scale factor changes.
>
> Design doc: go/expose-captured-surface-resolution
>
> Bug: chromium:383946052
> Change-Id: I363af33c569419d95ddf31a0cc2f9cecf6fb0c7b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374344
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Mark Foltz <mfoltz@chromium.org>
> Commit-Queue: Palak Agarwal <agpalak@google.com>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43827}

Bug: chromium:383946052
Change-Id: Iffcc889b9a560695302f71623e3e929ecb2489fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376061
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43832}
2025-01-31 06:36:04 -08:00
Ho Cheung
18b94b517d [rtc_base] Replace manual element initialization and movement with C++17 standard functions
This CL focuses on addressing the remaining TODO items in the
`//rtc_base/bounded_inline_vector_impl.h` file, mainly involving the two
functions `void DefaultInitializeElements` and `void MoveElements`.

In the `void DefaultInitializeElements` function, the placement new usage is
adopted. When using placement new, manual construction operations on objects are
usually required, and a fair amount of logic needs to be written to ensure
correct object construction. In contrast, the
`std::uninitialized_default_construct_n()` function only requires passing in the
starting address of the memory and the number of objects to be constructed, and
it can automatically construct objects in batches.

In the `void MoveElements` function, the original implementation also uses the
placement new usage. When using placement new to move objects, manual handling
of the moving operation for each object is required, and usually, `std::move`
needs to be combined to achieve the object's move semantics. However, the
`std::uninitialized_move_n()` function can automatically complete the object
moving process just by passing in specific parameters.

To improve the code's simplicity, it is considered to use
`std::uninitialized_default_construct_n()` and `std::uninitialized_move_n()` to
replace the original two placement new usages.

Fixed: webrtc:392037564
Change-Id: If8edcd9ac8a4d85be0ce0a23f6433d7f91b39ad3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375182
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Ho Cheung <hocheung@chromium.org>
Cr-Commit-Position: refs/heads/main@{#43831}
2025-01-31 05:31:32 -08:00
Jonas Oreland
de1735058b Revert "Reland "Allow sending to separate payload types for each simulcast index.""
This reverts commit 49ac6b758cc3c28be2fc13028a829f016b453d39.

Reason for revert: Break codec switch in singlecast.

Original change's description:
> Reland "Allow sending to separate payload types for each simulcast index."
>
> This is a reland of commit bcb19c00ba8ab1788ba3c08f28ee1b23e0cc77b9
>
> Original change's description:
> > Allow sending to separate payload types for each simulcast index.
> >
> > This change is for mixed-codec simulcast.
> >
> > By obtaining the payload type via RtpConfig::GetStreamConfig(),
> > the correct payload type can be retrieved regardless of whether
> > RtpConfig::stream_configs is initialized or not.
> >
> > Bug: webrtc:362277533
> > Change-Id: I6b2a1ae66356b20a832565ce6729c3ce9e73a161
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364760
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Florent Castelli <orphis@webrtc.org>
> > Reviewed-by: Florent Castelli <orphis@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43197}
>
> Bug: webrtc:362277533
> Change-Id: Ia82c3390cceb9f68315c2fd9ba5114693669af32
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374780
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43787}

Bug: webrtc:362277533
Change-Id: Ife7d43471c85fdea9bd26cc982bce410c0d75527
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376040
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43830}
2025-01-31 01:47:56 -08:00
Mirko Bonadei
9a407346fd Revert "Get DeviceScaleFactor for the captured monitor/screen"
This reverts commit e20fbb00d0e0219b710da24664e81a10b12c703a.

Reason for revert: Breaks WebRTC roll to Chromium, see:

https://chromium-review.googlesource.com/c/chromium/src/+/6218060

Example of error: https://ci.chromium.org/ui/p/chrome/builders/ci/win-arm64-rel-ready/51821/test-results?sortby=&groupby=

Original change's description:
> Get DeviceScaleFactor for the captured monitor/screen
>
> Accesses DeviceScaleFactor using the windows API
> GetScaleFactorForMonitor and adds it to the DesktopFrame. In a follow-up
> CL, this value is propagated to
> DesktopCaptureDevice::Core::OnCaptureResult where it is added to the
> frame metadata.
>
> In a follow-up CL, add RegisterScaleChangeEvent to get notified whenever
> the device scale factor changes.
>
> Design doc: go/expose-captured-surface-resolution
>
> Bug: chromium:383946052
> Change-Id: I363af33c569419d95ddf31a0cc2f9cecf6fb0c7b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374344
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Mark Foltz <mfoltz@chromium.org>
> Commit-Queue: Palak Agarwal <agpalak@google.com>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43827}

Bug: chromium:383946052
Change-Id: I3065b278939ca0e686ee6da0f0721082bc0c99e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375902
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43829}
2025-01-31 01:20:56 -08:00
webrtc-version-updater
45ebd339bd Update WebRTC code version (2025-01-31T04:06:50).
Bug: None
Change-Id: Ie31ceade6e0776e76b333f11a6904f9c4f8702c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376002
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43828}
2025-01-30 22:36:10 -08:00
Palak Agarwal
e20fbb00d0 Get DeviceScaleFactor for the captured monitor/screen
Accesses DeviceScaleFactor using the windows API
GetScaleFactorForMonitor and adds it to the DesktopFrame. In a follow-up
CL, this value is propagated to
DesktopCaptureDevice::Core::OnCaptureResult where it is added to the
frame metadata.

In a follow-up CL, add RegisterScaleChangeEvent to get notified whenever
the device scale factor changes.

Design doc: go/expose-captured-surface-resolution

Bug: chromium:383946052
Change-Id: I363af33c569419d95ddf31a0cc2f9cecf6fb0c7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374344
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43827}
2025-01-30 10:53:30 -08:00
Peter Hanspers
d643be9fdc Add a render error callback from AudioDeviceIOS to AudioDeviceModuleIOS.
This change expands on https://webrtc-review.googlesource.com/c/src/+/374420 to cover the error produced when copying microphone samples.

Change-Id: I7aa58c9c9ac175d5f4cfdb60bbd3f16334c03c1b
Bug: webrtc:390314937
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375540
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43826}
2025-01-30 02:57:06 -08:00
Jonas Oreland
4b39cb3eb6 Reland "Move piggybacking controller from P2PTC to DTLS transport"
This reverts commit 4de5839c1117e5bb96148c8575a74a69bde02768.

Reason for revert: Bug fixed + DCHECK added

Original change's description:
> Revert "Move piggybacking controller from P2PTC to DTLS transport"
>
> This reverts commit 29e639e0a495a537c610182ab9b04aed8cf10426.
>
> Reason for revert: found bug accessing variable after it has been moved.
>
> Original change's description:
> > Move piggybacking controller from P2PTC to DTLS transport
> >
> > The DTLS-STUN piggybacking controller is associated with both the DTLS
> > transport and the ICE transport (P2PTransportChannel). It turned out to
> > be more closely associated with the DTLS transport and requires less
> > plumbing when moved there.
> >
> > The config option to enable the feature remains as part of the ICE
> > transport config since the ICE transport does not know its "upstream"
> > DTLS transport and hence can not query the config from it.
> >
> > BUG=webrtc:367395350
> >
> > Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
> > Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43823}
>
> Bug: webrtc:367395350
> Change-Id: I2d83de8890b0aa230dd9e21cb5ce2eb03c8d3564
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375861
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43824}

Bug: webrtc:367395350
Change-Id: I4b4acccf15de565736b072ca2de88a1551a6378e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375862
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43825}
2025-01-30 02:51:41 -08:00
Jonas Oreland
4de5839c11 Revert "Move piggybacking controller from P2PTC to DTLS transport"
This reverts commit 29e639e0a495a537c610182ab9b04aed8cf10426.

Reason for revert: found bug accessing variable after it has been moved.

Original change's description:
> Move piggybacking controller from P2PTC to DTLS transport
>
> The DTLS-STUN piggybacking controller is associated with both the DTLS
> transport and the ICE transport (P2PTransportChannel). It turned out to
> be more closely associated with the DTLS transport and requires less
> plumbing when moved there.
>
> The config option to enable the feature remains as part of the ICE
> transport config since the ICE transport does not know its "upstream"
> DTLS transport and hence can not query the config from it.
>
> BUG=webrtc:367395350
>
> Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43823}

Bug: webrtc:367395350
Change-Id: I2d83de8890b0aa230dd9e21cb5ce2eb03c8d3564
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375861
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43824}
2025-01-30 00:26:07 -08:00
Philipp Hancke
29e639e0a4 Move piggybacking controller from P2PTC to DTLS transport
The DTLS-STUN piggybacking controller is associated with both the DTLS
transport and the ICE transport (P2PTransportChannel). It turned out to
be more closely associated with the DTLS transport and requires less
plumbing when moved there.

The config option to enable the feature remains as part of the ICE
transport config since the ICE transport does not know its "upstream"
DTLS transport and hence can not query the config from it.

BUG=webrtc:367395350

Change-Id: Iafd5abd8b65855bcf32bf840414d96513d8e6300
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375283
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43823}
2025-01-29 23:27:14 -08:00
fizzfang
feabcdb76b Reduce redundant memory allocation when capturing a single monitor.
When capturing only one display, it is unnecessary to use
DoDuplicateAll, which allocates bitmap image memory for a rectangle
encompassing all screens and captures all displays. In this case, I
switch to DoDuplicateOne.

I have added an int parameter to GetNumFrameCaptured and
EnsureFrameCaptured to distinguish which display's skip behavior is
currently being executed.

After the modification, when capturing a single monitor in a
multi-monitor environment, only the bitmap image memory of the size of
the captured monitor will be allocated, rather than for all monitors.

Bug: webrtc:391914255
Change-Id: Iee56796c50282beaf1dbeef47f5937fe7fe94a05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375181
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#43822}
2025-01-29 11:40:53 -08:00
Per K
eb688d6e80 Remove dependency to NetworkStateEstimator from TransportSequenceNumberFeedbackGenerator
NetworkStateEstimator is not used by WebRTC from receive side.

ReceiveSidesCongestionController::SetTransportOverhead is not needed either since NetworkStateEstimator is removed.
Note, CongestionControlFeedbackGenerator is used with RFC 8888 only and feedback frequency will be refactored in later cl.


Bug: webrtc:42220808
Change-Id: I08980aa19117e1de7a9b7896d05d07715dd9f962
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375460
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43821}
2025-01-29 08:43:47 -08:00
Jonas Oreland
3155346f66 Reland "Remove rtc_p2p"
This reverts commit c6278957d11fc63c6acc3791ef31672744ced623.

Reason for revert: importer fixed.

Original change's description:
> Revert "Remove rtc_p2p"
>
> This reverts commit a05ad63aa336b22850387dafdcb5f7fcb00c7fb3.
>
> Reason for revert: breaks importer :(
>
> Original change's description:
> > Remove rtc_p2p
> >
> > This completes the task of removing the rtc_p2p target.
> >
> > Bug: webrtc:42226155
> > Change-Id: I2cd145fe250fc2e572b4cacc0982520dbf2250b8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375660
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43817}
>
> Bug: webrtc:42226155
> Change-Id: If0ba5c78c376ed31a8cae48ea0fee7162f70d5ff
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375720
> Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#43819}

Bug: webrtc:42226155
Change-Id: I9d958507f235c7f9b4c455c4dccd81644ffa4363
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375741
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43820}
2025-01-29 00:40:03 -08:00
Jonas Oreland
c6278957d1 Revert "Remove rtc_p2p"
This reverts commit a05ad63aa336b22850387dafdcb5f7fcb00c7fb3.

Reason for revert: breaks importer :(

Original change's description:
> Remove rtc_p2p
>
> This completes the task of removing the rtc_p2p target.
>
> Bug: webrtc:42226155
> Change-Id: I2cd145fe250fc2e572b4cacc0982520dbf2250b8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375660
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43817}

Bug: webrtc:42226155
Change-Id: If0ba5c78c376ed31a8cae48ea0fee7162f70d5ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375720
Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43819}
2025-01-28 22:47:44 -08:00
webrtc-version-updater
a347fdf3c3 Update WebRTC code version (2025-01-29T04:03:12).
Bug: None
Change-Id: I56ebb4f90ae61df5741e3a479400d07bbe3b52aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375438
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43818}
2025-01-28 22:19:21 -08:00
Jonas Oreland
a05ad63aa3 Remove rtc_p2p
This completes the task of removing the rtc_p2p target.

Bug: webrtc:42226155
Change-Id: I2cd145fe250fc2e572b4cacc0982520dbf2250b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375660
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43817}
2025-01-28 13:51:57 -08:00
Harald Alvestrand
406d195d16 Move the rtc_p2p file last in its BUILD file
This will cause automation to not pick it up when searching for
headers.

Bug: webrtc:42226155
Change-Id: I4e93cd4eca13af32f76201df784b20a80ac9baed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375581
Commit-Queue: 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@{#43816}
2025-01-28 09:58:56 -08:00
Fanny Linderborg
5342220a1b Make corruption_detection_message publicly visible
Bug: webrtc:358039777
Change-Id: If15a36fd60ad4e434c07ae43b0a53bf2b5b04366
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375541
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43815}
2025-01-28 05:44:48 -08:00
Danil Chapovalov
87b7c1aa6e Reduce warning logging when minimum playout delay exceed maximum
There can be error log each frame when maximum playout delay sent with the frame exceed delay derived from the av-sync.
In such scenario prefer to limit the playout delay by the one attached to the received frame.

Bug: b/390043766
Change-Id: Ia57969df72f7a649e5a9280d5bb29986f5ea14b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374284
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43814}
2025-01-28 03:34:18 -08:00
Jonas Oreland
4a210486d3 DTLS 1.3 - patch 5
Extend DtlsRestart test to also
test with Dtls13 (and add variants
that tests caller/callee active).

BUG=webrtc:383141571

Change-Id: Ib8b48653d4ad3cb2f5d66d6e28fc9ab54064d804
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375620
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43813}
2025-01-28 03:15:36 -08:00
Danil Chapovalov
d8fea51d65 Revert "Cleanup usage of the global field trials in the PeerConnectionE2EQualityTest helper"
This reverts commit a97304ca03c2aeb4267dc1bd794c50aa8bdb9a69.

Reason for revert: performance tests still rely in on global field trials to configure PC created by this test fixture

Original change's description:
> Cleanup usage of the global field trials in the PeerConnectionE2EQualityTest helper
>
> Bug: webrtc:42220378
> Change-Id: I3dc1a71c043ef506b6d592673b04e49f4a022d17
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374901
> Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43803}

Bug: webrtc:42220378, webrtc:392672060
Change-Id: Ide265c1284f9d53c0b652ed5e144dfb0a532f87a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375621
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43812}
2025-01-28 02:51:54 -08:00
Harald Alvestrand
1a72c0ccb9 Move a test from media_session_unittest to codec_vendor_unittest
This test was only testing codec vendor functionality.

Bug: webrtc:360058654
Change-Id: I5763e766a44f6bb1542c4281b1d6c177a52c8c74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375600
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43811}
2025-01-28 01:44:01 -08:00
Evan Shrubsole
2bebeaffe5 Remove unused create_call.cc
Bug: None
Change-Id: I337c85cc141f0220b2e2b109397f54f25f6056e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375560
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43810}
2025-01-28 00:13:35 -08:00
webrtc-version-updater
fb31c99e03 Update WebRTC code version (2025-01-28T04:03:17).
Bug: None
Change-Id: I7f528db042ccd3d2fc0081be42d615e79b0578da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375432
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43809}
2025-01-27 21:54:37 -08:00
Florent Castelli
bea44590f6 desktop_capture: Fix Xrandr / Xrender order
Since Xrandr depends on Xrender, it needs to be explicitely listed before, otherwise linkers may not find the Xrender symbols.

Bug: None
Change-Id: Ifb1e82f63e1fc1645979c14b65e3beab06637cb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375428
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli SE <fcastelli@nvidia.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43808}
2025-01-27 14:57:28 -08:00
Danil Chapovalov
26617bef59 Make AV1 even payload size default-on when packetizer is used directly
This flip default behavior for webrtc users that create packetizers without help of RtpSenderVideo class.

Bug: webrtc:42226301
Change-Id: I42fe696039334672b7d0b0ed1f87a52c3f6bf5ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374883
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43807}
2025-01-27 08:02:33 -08:00
Harald Alvestrand
13170bd177 Refactor media_session to move codec handling to new class
The new class "CodecVendor" is intended to handle all logic dealing
with codecs. This CL is a no-behavior-change CL, later CLs will
change the logic.

Bug: webrtc:360058654
Change-Id: I44e76f0e0bd364eeb7d4506f3e01e9e00e2843a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375500
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43806}
2025-01-27 07:52:12 -08:00
Henrik Boström
6b7099527a VideoEncoder: rtc::StringBuilder instead of rtc::SimpleStringBuilder.
Whenever encoding info change, this ToString() method is called for some
LS_INFO logging inside video_stream_encoder.cc. Apparently the char
buffer used for constructing this string is not large enough because I
can get WebRTC to crash in a demo page that gets and sets a lot of
parameters.

By changing to rtc::StringBuilder, we don't have to make assumptions
about how long the string can get at runtime.

Bug: None
Change-Id: I32695523282143a301c0e13e06082d55bd2796b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375520
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43805}
2025-01-27 06:14:00 -08:00
Fanny Linderborg
39da6f3a75 Move corruption_detection_message from common_video to api/transport/rtp
Bug: webrtc:358039777
Change-Id: Ic27e162d67c64958844908cdd8413c406e88ea39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375201
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43804}
2025-01-27 03:23:51 -08:00
Danil Chapovalov
a97304ca03 Cleanup usage of the global field trials in the PeerConnectionE2EQualityTest helper
Bug: webrtc:42220378
Change-Id: I3dc1a71c043ef506b6d592673b04e49f4a022d17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374901
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43803}
2025-01-27 02:14:30 -08:00
Philipp Hancke
9ff254eaf2 srtp: stop using private libsrtp function to determine packet index
instead use the standard API to get the rollover counter and
determine the extended sequence number which is the basis for the packet index.

See https://github.com/cisco/libsrtp/issues/738 and
https://github.com/cisco/libsrtp/issues/721

BUG=webrtc:357776213

Change-Id: I90c5a4a538f56132158aa48db8700187fcdb47d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371960
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43802}
2025-01-26 22:10:27 -08:00
webrtc-version-updater
a9b40ae0a4 Update WebRTC code version (2025-01-26T04:03:33).
Bug: None
Change-Id: Ibe36ef5486c7a3683a2178d5a456952c85cda3a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375400
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43801}
2025-01-25 21:33:27 -08:00