6929 Commits

Author SHA1 Message Date
Jeremy Leconte
04dd95fcac Temporary add 'RTPVideoHeaderH264::nalus_length'.
This is a forward fix for https://webrtc-review.googlesource.com/c/src/+/354622 that breaks client code using nalus_length.

No-Try: true
Change-Id: Ic0fc41696e408adefe4eb8792150a64b1eab49da
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354840
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42493}
2024-06-17 08:07:16 +00:00
Sergio Garcia Murillo
469e69800f Remove kMaxNalusPerPacket hard limit for H264 frames
Bug: webrtc:346608838
Change-Id: I067401250994bc57897edff8e8a18c3088d96b08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354622
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42487}
2024-06-14 16:29:42 +00:00
Jan Grulich
025d69b4d0 PipeWire video capture: mmap() PipeWire buffers with MAP_SHARED
Some DMAbuf types don't properly implement MAP_PRIVATE as it requires
copy-on-write support. As we don't need to write to these buffers, we
can switch to MAP_SHARED instead, making it work reliably on current
kernels without having any drawbacks in this context.

Tested and confirmed with libcamera software ISP on Thinkpad X13 with
an arm processor.

Bug: webrtc:42225999
Change-Id: Ic47b8c90456cccf3742e8274945dbd64fb8aac6d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354623
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42484}
2024-06-14 07:19:05 +00:00
Jan Grulich
3252f5d8e4 PipeWire capture: fix mmap arguments
Do not add offset to the "length" argument for mmap call as it should be
passed as the last argument instead. This was not causing any problems
since the offset is usually 0, but it's still better to do it correctly.

Bug: webrtc:42225999
Change-Id: If1dbe7dfd2fb22c53493c0fafd23d782f0683a11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354521
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#42481}
2024-06-13 21:01:45 +00:00
Tommi
093824c4d2 Switch away from hz to samples per channel for FrameCombiner et al
This simplifies the following steps:
* FrameCombiner infers the sample rate from channel size
* Sends the inferred sample rate to FixedDigitalLevelEstimator
  and Limiter.
* Those classes then convert the sample rate to channel size.
  Along the way perform checks that the derived channel size value
  is a legal value (which has already been done by FrameCombiner).

To:
* FrameCombiner sends channel size to FixedDigitalLevelEstimator and
  Limiter.

Bug: chromium:335805780
Change-Id: I6d2953ba5ee99771f3ff5bf4f4a049a8a29b5577
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352581
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42480}
2024-06-13 19:00:39 +00:00
Jan Grulich
c3aeffd776 PipeWire camera: add support for BGRA/RGBA formats
Adds support for 32 bits formats needed for libcamera software ISP. This
is needed, because libcamera enforces 8 byte alignment and we only
support 3 byte alignment for RGB. This will make it work with 32 bits
aligned output formats recently added to libcamera.

Relevant libcamera patch: https://patchwork.libcamera.org/patch/20253/

This has been verified on an snapdragon device using libcamera and software ISP and on my machine using "vivid" virtual camera from libcamera and enforcing specific format.

Bug: webrtc:346808586
Change-Id: I8d89120660b2304b880d952c5acd7f5cd09b611e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354400
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42474}
2024-06-13 13:16:00 +00:00
Hanna Silen
7ee37cf839 Deprecate WebRTC-Audio-GainController2 fieldtrial
Bug: webrtc:7494
Change-Id: I315a6e5d203a7f7f86e27d5b1b1f7dd72ccf1b08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354100
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42468}
2024-06-12 12:37:49 +00:00
Sergey Silkin
6e37ee34d1 Reuse QP limits from the main encoder config
Set layer QP limits equal to QP limits in the main encoder config. This reduces number of nodes to modify if you need to change the settings.

Bug: b/337757868
Change-Id: Id7f6f9d6527903e8e22ff4fad2c974bee6e87cb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353982
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42466}
2024-06-12 09:45:52 +00:00
Tommi
ff2bf4b195 Update FrameCombiner to use audio view methods for interleaved buffers
Along the way slightly simplify the class interface since views
carry audio properties. Also, now allocating FrameCombiner allocates
the mixing buffer in the same allocation.

Bug: chromium:335805780
Change-Id: Id7a76b040c11064e1e4daf01a371328769162554
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352502
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42465}
2024-06-12 09:44:40 +00:00
Jan Grulich
633a41ff8e PipeWire camera: check for node existence before adding it to the list
This avoids having duplicate camera entries presented to the user when
PipeWire camera is being used.

Bug: webrtc:346350844
Change-Id: I423db7fe0654cc1b1c91ee5264c6ba5dc4e24100
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354320
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Andreas Pehrson <apehrson@mozilla.com>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#42462}
2024-06-11 15:54:00 +00:00
Hanna Silen
6f3103f23d Add AGC2 input volume controller mode in audioproc_f
Bug: webrtc:7494
Change-Id: I454f1fcdfe0eff2440b7fba426f8d950250b6a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353740
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42459}
2024-06-11 08:44:10 +00:00
Per K
41b934fe37 Fix GoogCcNetworkController::OnNetworkStateEstimate behaviour
Ensure OnNetworkStateEstimate behaves the same way as internal networks state updates.
Also, ignore OnNetworkStateEstimate if an internal estimator exist.

Bug: webrtc:10742
Change-Id: I7967d202381250c406824fb2d0574bb95d2cd592
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354102
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@google.com>
Cr-Commit-Position: refs/heads/main@{#42456}
2024-06-10 10:43:57 +00:00
Mirko Bonadei
33e6e80acc Actually skip AudioDecoderG722StereoTest.EncodeDecode on UBSan.
Bug: webrtc:345525069
Change-Id: Ib7f2fec96ccff01a55177180e8429c9b22bcd0d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353962
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42452}
2024-06-07 14:50:45 +00:00
Mirko Bonadei
9f6bb625e6 Skip tests failing with the new version of UBSan.
Bug: webrtc:345525069, webrtc:345674542
Change-Id: I031adfe33ed4057dcd79cc9fb431838f14b315dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353902
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42447}
2024-06-07 10:57:35 +00:00
Harald Alvestrand
c74412b304 Deprecate rtc::RefCountInterface
and move usages to webrtc::RefCountInterface

This CL also moves more stuff to webrtc:: and adds backwards
compatible aliases for them.

Bug: webrtc:42225969
Change-Id: Iefb8542cff793bd8aa46bef8f2f3c66a1e979d07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353720
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42446}
2024-06-07 09:47:26 +00:00
Mirko Bonadei
1b26b72f30 Disable G722 and iLBC tests failing with the new version of UBSan.
Bug: webrtc:345525069
Change-Id: I04712f297c7d2d5ea4556cd6157d9ee3bcada49b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353920
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42445}
2024-06-07 09:46:24 +00:00
Mirko Bonadei
bd4dd67dde Disable G722 and iLBC tests failing with the new version of UBSan.
Bug: webrtc:345525069
Change-Id: Iebe6a75252393f2bdf1e91b309f1b918708d413c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353860
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42443}
2024-06-07 09:18:10 +00:00
Mirko Bonadei
32fdb04f1f Disable G722 and iLBC tests failing with the new version of UBSan.
Bug: webrtc:345525069
Change-Id: I2d1a817b550f536cd46a0fa4c142e320e32f1701
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353840
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42442}
2024-06-07 08:54:46 +00:00
Tommi
67fd83eae2 Use MonoView for deinterleaved channels in AudioFrameView
Allow skipping the deinterleaving steps in PushResampler
before resampling when deinterleaved buffers already exist.

Bug: chromium:335805780
Change-Id: I2080ce2624636cb743beef78f6f08887db01120f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352202
Reviewed-by: Per Åhgren <peah@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42438}
2024-06-05 12:39:27 +00:00
Harald Alvestrand
6431a64f02 Reland "Run IWYU on some files I intend to work on"
This reverts commit fe34363ca0ff9d79d7d0943a98ae3a5198e61f75.

Reason for revert: Downstream error fixed.

Original change's description:
> Revert "Run IWYU on some files I intend to work on"
>
> This reverts commit 827da15f1408a399ed15ce5c9726b6af772fb71a.
>
> Reason for revert: Breaks downstream project
>
> Original change's description:
> > Run IWYU on some files I intend to work on
> >
> > and files that broke when I fixed the first set.
> >
> > Bug: webrtc:42226242
> > Change-Id: I321cd63537ab3002098c7bdecd889a6fc5a1eb25
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353421
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42429}
>
> Bug: webrtc:42226242
> Change-Id: I6b18dced08669c6741c6a51768fbb8b9072c6e82
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353580
> Owners-Override: 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@{#42430}

Bug: webrtc:42226242
Change-Id: I8ba51da47ea34d6bbf868e5ebc0037c6cffec8ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353660
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42437}
2024-06-05 08:59:49 +00:00
Hirokazu Honda
c045c6fc60 Mark MakeScalabilityMode() RTC_EXPORT
Bug: b:320555128
Test: Build
Change-Id: Ib08fa707eb14f2616fae1e1ece965b08c88f0bdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351441
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Hirokazu Honda <hiroh@google.com>
Cr-Commit-Position: refs/heads/main@{#42435}
2024-06-05 08:43:00 +00:00
Mirko Bonadei
876d0c9881 Fix use-of-uninitialized-value in NetEq tests.
The new version of MSan (rolled by [1]) detects the following:

```
==39908==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5591400a52ef in GetPlayoutDelayMs ./../../modules/audio_coding/neteq/decision_logic.cc:466:35
    #1 0x5591400a52ef in webrtc::DecisionLogic::ExpectedPacketAvailable(webrtc::NetEqController::NetEqStatus) ./../../modules/audio_coding/neteq/decision_logic.cc:311:36
    #2 0x5591400a39e9 in webrtc::DecisionLogic::GetDecision(webrtc::NetEqController::NetEqStatus const&, bool*) ./../../modules/audio_coding/neteq/decision_logic.cc:0:0
    #3 0x55913cf590c9 in webrtc::DecisionLogicTest_PreemptiveExpand_Test::TestBody() ./../../modules/audio_coding/neteq/decision_logic_unittest.cc:139:3
    #4 0x55913ef28283 in HandleExceptionsInMethodIfSupported<testing::Test, void> ./../../third_party/googletest/src/googletest/src/gtest.cc:0:3
    #5 0x55913ef28283 in testing::Test::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2710:5
    #6 0x55913ef2ab46 in testing::TestInfo::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:2856:11
    #7 0x55913ef2da34 in testing::TestSuite::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:3034:30
    #8 0x55913ef621e8 in testing::internal::UnitTestImpl::RunAllTests() ./../../third_party/googletest/src/googletest/src/gtest.cc:5964:44
    #9 0x55913ef60f54 in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> ./../../third_party/googletest/src/googletest/src/gtest.cc:0:0
    #10 0x55913ef60f54 in testing::UnitTest::Run() ./../../third_party/googletest/src/googletest/src/gtest.cc:5543:10
    #11 0x55913ee1a944 in RUN_ALL_TESTS ./../../third_party/googletest/src/googletest/include/gtest/gtest.h:2334:73
    #12 0x55913ee1a944 in webrtc::(anonymous namespace)::TestMainImpl::Run(int, char**) ./../../test/test_main_lib.cc:203:21
    #13 0x55913cbd36b8 in main ./../../test/test_main.cc:72:16
    #14 0x7fdb18c73082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:308:16
    #15 0x55913cb3e1a9 in _start ??:0:0
```

[1] - https://webrtc-review.googlesource.com/c/src/+/353620

Bug: b/344970813
Change-Id: I9b5d7791e68b4c494168ba9f007a3099ae21fed4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353581
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42433}
2024-06-05 07:07:37 +00:00
Jan Grulich
06e88bbb5a PipeWire capturer: fix some possible threading issues
- avoid holding a lock across OnCaptureResult() callback to avoid a risk
  of a possible deadlock
- annotate damage region as guarded by the same lock as latest frame as
  both belong together
- document the acqusition order between locks

Bug: chromium:333945842
Change-Id: I9c65beed720ba54e40b85fb243a07d40524695f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353600
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Andreas Pehrson <apehrson@mozilla.com>
Cr-Commit-Position: refs/heads/main@{#42432}
2024-06-04 19:01:59 +00:00
Mirko Bonadei
fe34363ca0 Revert "Run IWYU on some files I intend to work on"
This reverts commit 827da15f1408a399ed15ce5c9726b6af772fb71a.

Reason for revert: Breaks downstream project

Original change's description:
> Run IWYU on some files I intend to work on
>
> and files that broke when I fixed the first set.
>
> Bug: webrtc:42226242
> Change-Id: I321cd63537ab3002098c7bdecd889a6fc5a1eb25
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353421
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42429}

Bug: webrtc:42226242
Change-Id: I6b18dced08669c6741c6a51768fbb8b9072c6e82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353580
Owners-Override: 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@{#42430}
2024-06-04 11:36:06 +00:00
Harald Alvestrand
827da15f14 Run IWYU on some files I intend to work on
and files that broke when I fixed the first set.

Bug: webrtc:42226242
Change-Id: I321cd63537ab3002098c7bdecd889a6fc5a1eb25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353421
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42429}
2024-06-04 10:59:05 +00:00
Avi Drissman
f076fd91a1 Assume a modern macOS environment
Mac OS X 10.5 was shipped in 2006, and Mac OS X 10.7 was shipped in
2010. Assume that WebRTC is not running on releases older than
those.

Bug: none
Change-Id: Ia7323c2ae7f186602aa972f390ea682bd2d1ff47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353240
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42423}
2024-05-31 20:18:05 +00:00
Tommi
19510f861f Delete unused methods
Bug: none
Change-Id: I4ebd0d0c1be0bb1cabc2757cdfe82f0515f8a7da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351544
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42417}
2024-05-30 14:55:10 +00:00
Lionel Koenig
5889cf5888 Propagate arrival time inside NetEq
Bug: webrtc:341266986
Change-Id: I0fdd14e3fc5b09cbc9369497501f399464964211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352920
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42414}
2024-05-30 14:21:42 +00:00
Per K
79492bfe99 Add functions to send feedback according to RFC 8888 in ReceiveSideCongestionController.
With this cl, sending can be forced with field trial "WebRTC-RFC8888CongestionControlFeedback/force_send:true/"
In the future, ReceiveSideCongestionController::EnablSendCongestionControlFeedbackAccordingToRfc8888 if RFC 8888 has been negotiated.

Bug: webrtc:42225697
Change-Id: Ib09066aa89ca7b3fffc551da541090c69ab8d75f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352720
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42413}
2024-05-30 14:20:39 +00:00
Tommi
f58ded7cf0 Use audio views in Interleave() and Deinterleave()
Interleave and Deinterleave now accept two parameters, one for the
interleaved buffer and another for the deinterleaved one.

The previous versions of the functions still need to exist for test
code that uses ChannelBuffer.

Bug: chromium:335805780
Change-Id: I20371ab6408766d21e6901e6a04000afa05b3553
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351664
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42412}
2024-05-30 13:07:32 +00:00
Per K
a97c292a05 Ensure packets are sorted on arrival time in CongestionControlFeedbackGenerator
Without this, packets may be sorted in the wrong order.

Bug: webrtc:42225697
Change-Id: Ib9a72cdc7cb8f7ef6ca1571d095a6474215a83f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352821
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42411}
2024-05-30 11:23:24 +00:00
Lionel Koenig Gélas
61dc3ac202 Revert "Propagate arrival time inside NetEq"
This reverts commit 0a23279e33e48c88cc1336128f10090564df61af.

Reason for revert: Breaks internal Google builds.

Original change's description:
> Propagate arrival time inside NetEq
>
> Bug: webrtc:341266986
> Change-Id: I1532ba2329272d6ca1602924f4e9ee61b19ad890
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352201
> Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42405}

Bug: webrtc:341266986
Change-Id: I92c12df3d1c3f6584f2ead3d965d78988a7b5405
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352822
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Auto-Submit: Lionel Koenig Gélas <lionelk@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42410}
2024-05-30 11:06:43 +00:00
Per K
1072257098 Disable CongestionControlFeedbackGeneratorTest.ReportsFirstReceivedPacketArrivalTimeButEcnFromCePacketIfDuplicate
Because it is flaky !?

Bug: webrtc:42225697, b/343600373
Change-Id: I74415a9b97e90c25807b55053fd549f335b863ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352820
Reviewed-by: Markus Handell <handellm@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42408}
2024-05-30 08:12:45 +00:00
Lionel Koenig
0a23279e33 Propagate arrival time inside NetEq
Bug: webrtc:341266986
Change-Id: I1532ba2329272d6ca1602924f4e9ee61b19ad890
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352201
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42405}
2024-05-29 15:36:12 +00:00
Per K
bd49fa619b Add CongestionControlFeedbackGenerator
CongestionControlFeedbackGenerator collect receive time information about received
packets and sends feedback according to RFC8888


Bug: webrtc:42225697
Change-Id: I70b7f7322fd262f99f45fd56b6eb8630a11b30c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351543
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42404}
2024-05-29 14:35:57 +00:00
Per K
49c860fd61 Remove BWE logging functionality
BWE logging has as far as I know know been used for a long time. RTC event logs are the prefered method of logging.
Removed since it causes some BUILD pain.

For debugging  the metrics API https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/api/test/metrics/ can be used instead.

Bug: webrtc:343347276
Change-Id: I046b58d880faabfadbc22269b0392fdd644155fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42402}
2024-05-29 12:18:44 +00:00
Tommi
19c51ea537 Use std::array<> consistently for reusable audio buffers.
This is a minor change for places where we use
AudioFrame::kMaxDataSizeSamples sized intermediary buffers. The change
uses `std::array<>` instead of C style arrays which allows for use
of utility templates that incorporate type based buffer size checking.
Also adding `ClearSamples()` method, which complements CopySamples.

Bug: chromium:335805780
Change-Id: I813feb32937e020ceb9ca4b00632dc90907c93fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351681
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42400}
2024-05-29 09:20:36 +00:00
Jan Grulich
848980198e Video capture PipeWire: always capture latest processed buffer
Both CaptureFrame() and ProcessBuffer() hold a lock over the frame queue
and it happens that one waits for the other, causing unnecessary delays
since we already work with a queue having two frames, but this way we
don't really need a queue. Instead, keep reference to the last processed
buffer, which we will always use in CaptureFrame() and update it every
time at the end of ProcessBuffer(). This avoid unnecessary waiting for
the lock over the queue to be released.

Bug: chromium:333945842
Change-Id: I4afeb1daacd342e92578a50ac6e1c89a691bb8f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350042
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#42394}
2024-05-28 20:02:39 +00:00
Per K
61fff586b1 Split out time_util to separate target ntp_time_util
Split out time_util.h and cc from target rtp_rtcp to its own target.
This is to avoid possible circular dependencies and not having all targets using them to depend on the full RtpRcp module.


Bug: webrtc:343076000
Change-Id: I7b3c84456b17f1920f71afdd5a644d27e28caed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42392}
2024-05-28 13:31:00 +00:00
Manashi Sarkar
0121ff40da Revert "Propagate arrival time inside NetEq"
This reverts commit 5237cbbe6851a6728c5d78add47e3d0cb80142ec.

Reason for revert: Breaks build.

Original change's description:
> Propagate arrival time inside NetEq
>
> Bug: webrtc:341266986
> Change-Id: I313ded76b884e9ee0f00f43541c8e9aebc406001
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351340
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42381}

Bug: webrtc:341266986
Change-Id: I3c067b95055a8b3e7208cc6e45a5b581f8d65be6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351541
Commit-Queue: Manashi Sarkar <manashi@google.com>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Lionel Koenig Gélas <lionelk@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42387}
2024-05-27 17:17:04 +00:00
Per K
30f1cb318b Remove dependency from rtp_rtcp module to remote_bitrate_estimator
This depenency is not needed and may lead to a circular dependency. The cl removes old unused functionaliy to log BWE related statistics using compile time flags.

Bug: webrtc:42225697
Change-Id: I6cc01b367c0c48ab30f34c12a10afc58d1e7822f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352142
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42386}
2024-05-27 15:49:28 +00:00
Björn Terelius
d297c4c23f Include-what-you-use goog_cc/
Bug: webrtc:42226242
Change-Id: I34ce35c78dbe3d08f8c43fbbe70e420a9eb3dd4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351662
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42385}
2024-05-27 14:29:33 +00:00
Lionel Koenig
5237cbbe68 Propagate arrival time inside NetEq
Bug: webrtc:341266986
Change-Id: I313ded76b884e9ee0f00f43541c8e9aebc406001
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351340
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42381}
2024-05-27 12:48:00 +00:00
Tommi
5d3e6805f2 Add audio view classes
From the new header file:
* MonoView<>: A single channel contiguous buffer of samples.
* InterleavedView<>: Channel samples are interleaved (side-by-side) in
  the buffer. A single channel InterleavedView<> is the same thing as a
  MonoView<>
* DeinterleavedView<>: Each channel's samples are contiguous within the
  buffer. Channels can be enumerated and accessing the
  individual channel data is done via MonoView<>.

There are also a few utility functions that offer a unified way to check
the properties regardless of what view type is in use.

Bug: chromium:335805780
Change-Id: I28196f8f4ded4fadc72ee32b62af304c62f4fc47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349300
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42377}
2024-05-24 18:08:37 +00:00
Björn Terelius
0596503938 Split BandwidthUsage from network_state_predictor.h
Bug: None
Change-Id: Ie1d0c1fd4b32fc5f9e4252bfe0fd2ca1412bd594
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351002
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42376}
2024-05-24 13:44:37 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Per K
c78f25b7f0 Rename RemoteEstimatorProxy to TransportSequenceNumberFeedbackGenenerator
This is done to better reflect the responsibility of the class.
The implementation implement a new interface FeedbackGeneratorInterface. The purpose of the interface is to allow a new implementation that supports RFC 8888.

Bug: webrtc:42225697
Change-Id: Id087dd7422abbcd6016693c076a65f4c4efd5712
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351280
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42366}
2024-05-22 15:31:19 +00:00
Sergey Silkin
44e63aaf0a Run encode-only test if --decoder=null
Bug: webrtc:42225151, b/337757868
Change-Id: I40da9d2b67f6757e2340a965e95fc1751c406a0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351041
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42356}
2024-05-21 09:05:04 +00:00
Philipp Hancke
3643acbd77 neteq test: add opus/red with default payload type
BUG=webrtc:42221750

Change-Id: I272bcb84ce8deb73497e93d3ffe6549019040d02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350868
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42351}
2024-05-20 15:39:11 +00:00
Danil Chapovalov
f317f7106a Remove option to parse RateControlSettings from the global field trial string
Bug: webrtc:42220378
Change-Id: Iff016f0f53f427ff59df816d8d87dc4a8119db65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350921
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42348}
2024-05-20 10:38:14 +00:00