7245 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Fanny Linderborg
f2ecdd7ea3 Use ElementsAreArray in corruption detection unittests
Remove incorrect parantheses around expression as well

Bug: webrtc:358039777
Change-Id: I0e5de93b3ef23a18989e50fbe70a37c6ed198290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375240
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43796}
2025-01-24 04:06:37 -08:00
k-wasniowski
eafee5e3d6 fix: h26x packet buffer video artifacts
This change resolves an issue that arises when there is a gap in the
sequence numbers of packets associated with a single frame.

Before this change, the H26x packet buffer could potentially assemble a
frame using only a subset of the packets in the buffer if a packet was
missing in the middle and a packet with a marker bit arrived.

To address this, the change introduces a check before assembling a
frame. This ensures that all packets belonging to a single frame are
correctly collected by iterating backward until the first packet in the
frame is identified.

Bug: webrtc:384391181
Change-Id: I4d09a3d6d569624ece204264cb32e5076ed090a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374183
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jianlin Qiu <jianlin.qiu@intel.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43793}
2025-01-24 02:47:35 -08:00
Erik Språng
d621b419a3 Make WebRTC-Video-AV1EvenPayloadSizes default-on.
Experimentation shows only a slight increase in bitrate due to improved
BWE. There's no negative side-effects we have been able to see so far.

This CL flips the experiment to default-on but is kept around as a
kill-switch until the next milestone just in case something unexpected
is discovered.

Bug: webrtc:42226301
Change-Id: I4a0b1c85e912b909d7bff58d78966cf161857f7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374182
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43773}
2025-01-20 07:23:58 -08:00
Evan Shrubsole
f1b3e3e115 Replace gunit.h macros with WaitUntil in modules/
Bug: webrtc:381524905
Change-Id: Ifde77639d720b404eda2e21275d0c3682ac933c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374222
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43770}
2025-01-20 02:17:10 -08:00
thebongy
d23d04163d Fix to allow small negative jumps due to out of order packets in packet buffer
This resolves an issue where when packets appear out of order at the
beginning of a stream, packet_buffer.cc might drop the entire packet
buffer because it detects a "large negative jump" even though the
difference in sequence numbers is very minor and is caused by network
congestion / packet re-ordering. Currently, when the issue occurs, this
can cause video corruption/artifacts. More details and reproduction is
available on the attached webrtc bug report 390329776.

Bug: webrtc:390329776
Change-Id: Idb56eb2e066d596d8afd7ec904359baf0cb3feef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374540
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43753}
2025-01-17 00:52:36 -08:00
Danil Chapovalov
23b95d4fe4 Propagate field trials to aec3 sub components
Bug: webrtc:369904700
Change-Id: I17264de11346838b70ab2c47d6f6dc768e74b41a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374361
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43746}
2025-01-16 04:02:36 -08:00
Danil Chapovalov
c329350008 Propagate field trials into EchoCanceller3
Bug: webrtc:369904700
Change-Id: I698dd126f1627f84abe2633bde215c06aeef6299
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43733}
2025-01-14 07:41:22 -08:00
Danil Chapovalov
bf4c1bcd94 Propagate field trials into AgcManagerDirect
Bug: webrtc:369904700
Change-Id: I8389627f46494f825bcdcb59022ddfa992f74639
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43722}
2025-01-13 05:43:56 -08:00
Boris Tsirkin
2849146823 Disable clang-format in Matlab files
Matlab files extension is the same as ObjC, which is .m
This makes clang-format think that those files are ObjC and then it
wrongly formats them, leading to output that doesn't compile at all.
It's a known issue and the solution is to disable it in Matlab files.

I don't want to disable ObjC in whole folders, because of 2 reasons:
1) I want ObjC to be properly formatted if new files are added in the
   future
2) C++ header files are interpreted as ObjC and it will disable their
   formatting

According to clang documentation
(https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code), we can disable formatting inline.
However, comments in Matlab are prefixed with `%` and not `//`, so I
thought of a kinda hacky solution, which is `% // clang-format off`, and
it works perfectly.

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I281462fd1aecd3ff0428e6ee974514ebabc696ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374060
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43700}
2025-01-09 13:37:34 -08:00
Boris Tsirkin
c940dba16a Format the rest of C files in the repo
Formatting done via:
git ls-files | grep -E '.*\.c$' | grep -Ev '^common_audio/signal_processing.*\.c$' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: Id78af8e3eceada9995e53b6a0fdc1a8cb5ffd1f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373907
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43699}
2025-01-09 09:12:45 -08:00
Boris Tsirkin
7eb83a3a18 Add .clang-format in third_party folders to disable formatting
After applying this change, I reformatted the previously formatted files
and verified no changes were applied.

Bug: webrtc:42225392
Change-Id: I6079e1e85d94ae2bc892db1db81bc8223b3a08b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374040
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43698}
2025-01-09 06:09:48 -08:00
Philipp Hancke
d7b4c56d57 Support opus red in neteq_rtpplay
BUG=webrtc:42221750

Change-Id: I6fc92c454cbe17865c8ef69f1e9fca084493ebfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373642
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43687}
2025-01-08 11:19:46 -08:00
Boris Tsirkin
dadb9f4643 Format /modules folder
Formatting done via:

git ls-files | grep -E '^modules\/.*\.(h|cc|mm)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I5154c8e290591a6a0599b53802eaf152038c5f47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373703
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43677}
2025-01-08 03:46:30 -08:00
Jianjun Zhu
a23fbc694f Fix is_first_packet_in_frame flag for h26x_packet_buffer_unittests.
Update unit tests to follow video_rtp_depacketizer_h264's behavior of
setting is_first_packet_in_frame. This flag might be used to determine
if a frame can be assembled.

Bug: webrtc:384391181
Change-Id: I6750c20056e426e12c1d4e21eea4c641def7cfbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373168
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43669}
2025-01-07 11:59:54 -08:00
Qiu Jianlin
abadbce1fa Update is_first_packet_in_frame flag in H.265 depacketizer
Follow H.265 spec section 7.4.2.4.4 to set is_first_packet_in_frame flag
in rtp header, to make sure we only set it to true when corresponding
NALU can be the first NALU in a frame.

Bug: chromium:384391181
Change-Id: I082c38513d9d213f8d354633539028b57777368f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372742
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43651}
2025-01-03 05:07:21 -08:00
Danil Chapovalov
a5d2906206 Pass Environment to echo controller factory
When echo controller factories are updated, it would be possible to pass Environment into EchoCanceller3 and thus rely on propagated field trials.

Bug: webrtc:369904700
Change-Id: Iba9c04edbaab23277874234bd289e2c37625b1c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43614}
2024-12-19 07:12:35 -08:00
Per Kjellander
fab4992f3d Only notify NetworkLinkObserver if SSRC match known SSRC
There is one RTCP receiver per receive stream. Therefore, only handle a
received CongestionControlFeedback in the RTCP receiver corresponding to
the first SSRC in the report.

Bug: webrtc:42225697
Change-Id: I9bc0009cb6840cddeaca25f39c597bc2c13a3604
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372280
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43613}
2024-12-19 05:32:47 -08:00
Per Kjellander
776866774f Propagate desicion if RTP packet should be ECT(1) marked to socket
With this CL, the decision if an RTP packet should be sent as ect(1) is made in RtpControllerSend depending on if RFC 8888 has been negotiated and if CCFB is received with ECN enabled.
Since webrtc does not yet adapt to ECN feedback, packets are sent as ECT(1) until the first feedback is received.

Change-Id: Iddf63849328afbe54a7c8f921f2e8db134aeff6a
Bug: webrtc:42225697
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367388
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43609}
2024-12-19 01:59:49 -08:00
Danil Chapovalov
8da0652263 Switch to injected field trials in GainController2
Bug: webrtc:369904700
Change-Id: I28dc43ffe4f1edaf55a5be05371618cbb76d0709
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371660
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43596}
2024-12-18 02:39:19 -08:00
Shunbo Li
6f866347ff Fix H26xPacketBuffer Behavior Changes for Padding Packets
This commit fixes the issue of H26xPacketBuffer not supporting the
 RTP padding packet.

Bug: webrtc:383841353
Change-Id: Ibd87cd9c18577d990fa56a2fdfed1552d33b58a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371840
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43586}
2024-12-17 03:35:55 -08:00
Takuto Ikuta
5c5bb5b099 add missing includes for the build with use_libcxx_modules
This is to fix build error when we set use_libcxx_modules=true in
chromium build.

Bug: chromium:40440396
Change-Id: Iad165a78a6920ccb858567d31fbe5e48d8a7b629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43574}
2024-12-16 01:47:31 -08:00
Danil Chapovalov
4c73d1a326 Starting using propagated field trials in the AudioProcessingImpl
Bug: webrtc:369904700
Change-Id: Ibc9a2e5349f0d1ba7a7a7ebdd57dfddaf092a1af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43564}
2024-12-13 11:05:17 -08:00
Danil Chapovalov
3e98919a6a Reland "Validate frame consistency when writing DependencyDescriptor"
This reverts commit 81aa059b85949001dabbedaaf99574dc6390882f.

Reason for revert: downstream tests fixed

Original change's description:
> Revert "Validate frame consistency when writing DependencyDescriptor"
>
> This reverts commit 200fd82771ae29d23b2be40194be674b3437f0ab.
>
> Reason for revert: breaks downstream
>
> Original change's description:
> > Validate frame consistency when writing DependencyDescriptor
> >
> > To write DependencyDescriptor frame properties should be consistent with
> > the FrameDependencyStructure.
> > Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
> > Thus DependencyDescriptorWriter should be more protective to avoid crashes.
> >
> > Bug: chromium:379282549
> > Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43551}
>
> Bug: chromium:379282549
> Change-Id: I7711756f774648cbb85c51b61424bb950c1d3775
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371420
> Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
> Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#43556}

Bug: chromium:379282549
Change-Id: I71ef363d710b7f28b298d11543e1c8ad6c884f15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371304
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43563}
2024-12-13 10:17:33 -08:00
Danil Chapovalov
29a3f928f9 In PacketBuffer do not attempt to clear before 1st packet
ClearTo logic relies on clear to sequence number follows first_seq_num_

Bug: chromium:370689424
Change-Id: I12874d5ce7adfdcf9c0691acacdd2b8ae41ce307
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371320
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43558}
2024-12-13 04:27:19 -08:00
Jeremy Leconte
81aa059b85 Revert "Validate frame consistency when writing DependencyDescriptor"
This reverts commit 200fd82771ae29d23b2be40194be674b3437f0ab.

Reason for revert: breaks downstream

Original change's description:
> Validate frame consistency when writing DependencyDescriptor
>
> To write DependencyDescriptor frame properties should be consistent with
> the FrameDependencyStructure.
> Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
> Thus DependencyDescriptorWriter should be more protective to avoid crashes.
>
> Bug: chromium:379282549
> Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43551}

Bug: chromium:379282549
Change-Id: I7711756f774648cbb85c51b61424bb950c1d3775
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371420
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43556}
2024-12-13 00:19:47 -08:00
Danil Chapovalov
1bb49e9ad4 Delete deprecated AudioProcessingBuilder
BuiltinAudioProcessingBuilder should be used instead.
This would allow AudioProcessingImpl to have Environment construction parameter and thus use propagated rather than global field trials.

Bug: webrtc:369904700
Change-Id: I4fcc299bb9e65c109a3fe476c755a81c2aea551c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368480
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43553}
2024-12-12 12:50:56 -08:00
Danil Chapovalov
200fd82771 Validate frame consistency when writing DependencyDescriptor
To write DependencyDescriptor frame properties should be consistent with
the FrameDependencyStructure.
Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
Thus DependencyDescriptorWriter should be more protective to avoid crashes.

Bug: chromium:379282549
Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43551}
2024-12-12 08:54:04 -08:00
Fanny Linderborg
3a1f2e6a69 Delete FrameToRender from VCMReceiveCallback
The `FrameToRender` method is deprecated and has been replaced by
`OnFrameToRender`.

Bug: webrtc:358039777
Change-Id: Ibe56bd43cf045d814137ba8c4374bc9b9ce8ef6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371302
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43547}
2024-12-12 07:34:08 -08:00
Takuto Ikuta
000f04375b add missing includes for the build with use_libcxx_modules
This is to fix build error when we set use_libcxx_modules=true in
chromium build.

Bug: chromium:40440396
Change-Id: I5ab1cfcc0d060021892aae0e5ff3f0b647ae4266
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370860
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43541}
2024-12-11 17:32:19 -08:00
Jiewei Qian
4ef6ddd980 ssci: mark fft as "canonical"
Based on the description, this dependency have no meaningful upstream,
and is maintained inside webrtc.

Marking this dependency's URL to indicate the webrtc's repo is the
canonical repo.

Fixed: chromium:362397270
Change-Id: If6e16a6e34e0083be31d4436fcdfa7c83cd9179a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Jiewei Qian <qjw@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43535}
2024-12-11 10:53:06 +00:00
Harald Alvestrand
50387647ec Update fft/README.chromium to conform to guidelines.
No-Try: true
Bug: webrtc:42234774, chromium:362397270
Change-Id: Id8d7368ded541b2bc31b53fc86158c366bf1d57d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370842
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43524}
2024-12-10 09:14:48 +00:00
Sergey Silkin
93f5f9e867 Restrict max number of threads in dav1d settings
Dav1d expects Dav1dSettings::n_threads to be in range [0,256]. http://google3/third_party/dav1d/src/lib.c;l=130;rcl=674317898

Bug: none
Change-Id: I4a7dfd15be733b84809aa1fc496b261d097ca5e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370800
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43516}
2024-12-09 13:55:13 +00:00
Per Kjellander
15543544b9 Test that caller adapts to link capacity using CCFB
Fix todo to ensure TransportSequence numbers are generated if CCFB according to RFC 8888 is used. Transport sequence numbers are used in BWE algorithms regardless of feedback format.

Bug: webrtc:42225697
Change-Id: I6eab95c0241d590f6e7a90d19c82d13ab8692f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370341
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43515}
2024-12-09 11:35:03 +00:00
Erik Språng
4c56c9ff9a Add helper class for determining ACD filter settings.
Further, add use of it in libvpx_vp8_encoder and with tuning for keyframes and lower bound of std_dev = 1.25 to work around some edge cases. Plus some minor cleanup.

Bug: webrtc:358039777
Change-Id: I6f624a6a8c7ccfe2fe656e4c089c225296f0264f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370061
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43513}
2024-12-09 10:21:43 +00:00
Björn Terelius
711e1a8beb Create a custom test launcher for android
Set use_default_launcher=false in rtc_test on android

Bug: webrtc:42223878
Change-Id: If05da40b420d5da8f9e0f39560eb07380ebada14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368921
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43505}
2024-12-06 09:30:37 +00:00
Per K
ae1ad04077 Add support for receiving congestion control messages to rtcp transceiver
Congestion control feedback messages follow RFC 8888.

BUG: webrtc:42225697
Change-Id: If7e55249ac479636c0bab5cbcf96e70c1976a51d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370161
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43486}
2024-12-03 16:55:20 +00:00
Harald Alvestrand
10c7d73688 Fix sign error in UMA for AbsCapture.Delta
Bug: webrtc:380712819
Change-Id: Icfb42f0455718058a54391e5a586f409cd28728d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370000
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43481}
2024-12-03 02:24:53 +00:00
Philipp Hancke
b0be928a50 Cleanup H264 packetization unit tests
improve consistency, formatting and style

BUG=None

Change-Id: Iad382d9a7194b0606c1aa9c7d264dfacf03cde1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369462
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43479}
2024-12-02 17:43:16 +00:00
Erik Språng
5fc7489aa0 Fix corruption score not being calculated on higher spatial layers.
This is a re-upload of
https://webrtc-review.googlesource.com/c/src/+/369020

Bug: webrtc:358039777
Change-Id: I7456940965084d0ce55b29b3b9bc98162cfff948
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369862
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43478}
2024-12-02 14:46:45 +00:00