6686 Commits

Author SHA1 Message Date
Caroline Liu
0689cfc6ce Reland "[fuchsia] remove Scenic/UseFlatland dependency in DesktopCapturer"
This reverts commit 726992d7a4722b8a283d797d04432d0c6335ca96.

Reason for revert: Relanding with original errors fixed (tested by building the patch locally against Chromium)

This change no longer attempts to migrate the display size protocol from fuchsia.ui.scenic.Scenic/GetDisplayInfo to fuchsia.ui.display.singleton.Info/GetMetrics because the latter API was introduced in Fuchsia API 12, which is not yet supported in Chrome (hence some of the build errors causing the revert).

Original change's description:
> Revert "[fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer"
>
> This reverts commit fe5be2eb4ff8dccd96257fb8cbf32500c636c358.
>
> Reason for revert: This breaks the WebRTC roll into Chromium:
>
> - https://chromium-review.googlesource.com/c/chromium/src/+/4688561
> - https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/399140/overview
>
> Error:
>
> [4273/4389] CXX obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
> FAILED: obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
> ../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewra...(too long)
> ../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:59:10: error: use of undeclared identifier 'capturer'
> 59 |   return capturer(new ScreenCapturerFuchsia());
> |          ^
> ../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:199:36: error: no type named 'InfoSyncPtr' in namespace 'fuchsia::ui::display::singleton'
>
> Original change's description:
> > [fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer
> >
> > We previously used:
> > - fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
> >   Flatland; from now on it should always be the case, so this check is
> >   no longer necessary.
> > - fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
> >   fuchsia.ui.gfx.DisplayInfo. This has been migrated to
> >   fuchsia.ui.display.singleton.Info/GetMetrics and
> >   fuchsia.ui.display.singleton.Metrics.
> >
> > Bug: fuchsia:100303
> > Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
> > Reviewed-by: Emircan Uysaler <emircan@google.com>
> > Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> > Commit-Queue: Caroline Liu <carolineliu@google.com>
> > Cr-Commit-Position: refs/heads/main@{#40432}
>
> Bug: fuchsia:100303, b/291393959
> Change-Id: Iae70e568a8c9819e40e48069af8cea0d4ef2b6c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311801
> 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@{#40436}

Bug: fuchsia:100303, b/291393959
Change-Id: Icb7074ac86c1804ab2bdf809ea1496539ee2bf80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312000
Commit-Queue: Caroline Liu <carolineliu@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40452}
2023-07-21 16:47:17 +00:00
Danil Chapovalov
630c40d716 Update RtpSenderVideo::SendVideo/SendEncodedImage to take Timestamp/TimeDelta types
Bug: webrtc:13757
Change-Id: I2f21b14ecf003c5cb0c4c92d0c6b9b6f11c35f71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311945
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40450}
2023-07-21 10:36:49 +00:00
henrika
e66a85c278 kDummyAudio now also creates Dummy ADM on Android
The old Android ADM was removed in https://webrtc-review.googlesource.com/c/src/+/271841.

This change resulted in a NULL as result when asking for a
kDummyAudio ADM on Android.

The small change below should ensure that a dummy ADM can be
created on Android as well.

Bug: webrtc:7452, b/291275589
Change-Id: I2c995ce6ba9a4117e3e39596546b133fe1c49204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311946
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40440}
2023-07-17 15:22:22 +00:00
Björn Terelius
fd5bdca28c Revert "Disable VideoCaptureTest due to flakyness"
This reverts commit 4ee5e5f294dcd342851bbe80004ddd661fc6f3ed.

Reason for revert: HW fixed (hopefully)

Original change's description:
> Disable VideoCaptureTest due to flakyness
>
> Bug: webrtc:15229
> Change-Id: I3303b13be74d9eae5c52ecb2b920c23ac7d063d4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308220
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40244}

Bug: webrtc:15229
Change-Id: I30ad37236ffcb56d7ffe4d3efa3d03705be25c47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311804
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40437}
2023-07-17 09:02:44 +00:00
Mirko Bonadei
726992d7a4 Revert "[fuchsia] remove Scenic and GFX dependencies in DesktopCapturer"
This reverts commit fe5be2eb4ff8dccd96257fb8cbf32500c636c358.

Reason for revert: This breaks the WebRTC roll into Chromium:

- https://chromium-review.googlesource.com/c/chromium/src/+/4688561
- https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/399140/overview

Error:

[4273/4389] CXX obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
FAILED: obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewra...(too long)
../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:59:10: error: use of undeclared identifier 'capturer'
59 |   return capturer(new ScreenCapturerFuchsia());
|          ^
../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:199:36: error: no type named 'InfoSyncPtr' in namespace 'fuchsia::ui::display::singleton'

Original change's description:
> [fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer
>
> We previously used:
> - fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
>   Flatland; from now on it should always be the case, so this check is
>   no longer necessary.
> - fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
>   fuchsia.ui.gfx.DisplayInfo. This has been migrated to
>   fuchsia.ui.display.singleton.Info/GetMetrics and
>   fuchsia.ui.display.singleton.Metrics.
>
> Bug: fuchsia:100303
> Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
> Reviewed-by: Emircan Uysaler <emircan@google.com>
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Caroline Liu <carolineliu@google.com>
> Cr-Commit-Position: refs/heads/main@{#40432}

Bug: fuchsia:100303, b/291393959
Change-Id: Iae70e568a8c9819e40e48069af8cea0d4ef2b6c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311801
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@{#40436}
2023-07-17 08:12:48 +00:00
Caroline Liu
fe5be2eb4f [fuchsia] remove Scenic and GFX dependencies in DesktopCapturer
We previously used:
- fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
  Flatland; from now on it should always be the case, so this check is
  no longer necessary.
- fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
  fuchsia.ui.gfx.DisplayInfo. This has been migrated to
  fuchsia.ui.display.singleton.Info/GetMetrics and
  fuchsia.ui.display.singleton.Metrics.

Bug: fuchsia:100303
Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
Reviewed-by: Emircan Uysaler <emircan@google.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Caroline Liu <carolineliu@google.com>
Cr-Commit-Position: refs/heads/main@{#40432}
2023-07-14 21:05:29 +00:00
Philipp Hancke
c0ed83eac2 Bail out early if the RTP send module for a SSRC was not found
since it might have been deregistered previously.

BUG=chromium:1454860,chromium:1459124

Change-Id: I70ba43265361d040e568f83b6400ff8f3c2a8e98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40431}
2023-07-14 10:45:36 +00:00
Danil Chapovalov
aa8faa6423 Update RtcpReceiver to use Timesetamp/TimeDelta types instead of raw ints
Bug: webrtc:13757
Change-Id: Ie0317a584406bec3c34403a7bc8059e4272b339f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311674
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40429}
2023-07-13 12:08:10 +00:00
Jan Grulich
0e9556a90c Desktop capture: introduce capturer requesting both screen and windows
When PipeWire and xdg-desktop-portals are used, we can actually combine
both source types into one request. Make this part of the API for those
who want to use it this way, e.g. Firefox or Electron, otherwise they
will end up making two simultaneous requests, resulting into two dialogs
at the same time asking, while they can be combined into just one.

Bug: webrtc:15363
Change-Id: Ib6e1e47f66cb01d5c65096aec378b44c3af5f387
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311549
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40425}
2023-07-12 18:59:24 +00:00
Anne Redulla
73d51f8e84 [ssci] Added Shipped field to READMEs
This CL adds the Shipped field (and may update the
License File field) in Chromium READMEs. Changes were
automatically created, so if you disagree with any of
them (e.g. a package is used only for testing purposes
and is not shipped), comment the suggested change and
why.

See the LSC doc at go/lsc-chrome-metadata.

Bug: b:285450740
Change-Id: If4955c6f6e7b58e0c99469fc45ed5b9e8f30a32b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311720
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Anne Redulla <aredulla@google.com>
Cr-Commit-Position: refs/heads/main@{#40424}
2023-07-12 07:31:06 +00:00
Jianhui Dai
32a8169a65 Use common VideoFrameTypeToString helper
This CL cleans up all local conversions, in favor of the common helper
function.

Bug: webrtc:15210
Change-Id: Id77e1c6b1151a2542d92e220e91d5b11285479b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311060
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianhui J Dai <jianhui.j.dai@intel.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40420}
2023-07-12 00:28:47 +00:00
Alfred E. Heggestad
6a4f409241 pacing_controller: add millisecond units to warning message
Bug: None
Change-Id: I8a5c5ca6a641a74213116a734f3c19c6972e5916
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311400
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40418}
2023-07-11 17:00:06 +00:00
Tony Herre
9d677f4cdc Set surrogate receive times for transformed sender frames
Without this, 'Sender' frames inserted into the writer of an encoded
transform have an invalid receive time (0), which breaks all later
heuristics which build on the receive time, eg the VCMTiming estimators
used for controlling the playback delay.

Bug: chromium:1463451
Change-Id: I413c884e08986148d4a854cd275212b21d093ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311544
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40416}
2023-07-11 14:30:18 +00:00
Jan Grulich
8fcc6df79d PipeWire capturer: increase buffer size to avoid buffer overflow
Recently added framerate option can cause a buffer overflow and make
PipeWire to fail on negotiation, which effectively makes screen sharing
not to work.

Bug: webrtc:15346
Change-Id: I4a68e26c8f85ca287b06a25da500b6a7009e075f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311541
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40413}
2023-07-10 17:32:30 +00:00
Artem Titov
599367595d Allow StartRecording if capturer is null in test ADM
Bug: b/272350185
Change-Id: I3aca6d8b3eb4fd39a6d39f1fea272858e18193bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311463
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40407}
2023-07-07 14:01:38 +00:00
Alfred E. Heggestad
e9ae738c7c rtcp_sender: uppercase protocol names (RTCP) in log messages
Bug: None
Change-Id: Ie6683897fca469a15c1aa054eeb1b2d378b22bcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311461
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40405}
2023-07-06 13:34:31 +00:00
Philipp Hancke
3f10b4917e Log SSRC for video decode errors
which makes it possible to grep the logs for all decode errors
on a particular SSRC.

BUG=None

Change-Id: I4aa54434f0b85932313adaf39e099729991a4700
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308823
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40404}
2023-07-06 11:24:16 +00:00
Artem Titov
1a8c1aedbc Add raw file audio capturer/renderer for test ADM
Bug: b/272350185
Change-Id: Ie8c7f7be30d06b238240086eee172332287c77ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311280
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40399}
2023-07-04 11:03:25 +00:00
Li-Yu Yu
758f26852d Fix downstream review comments for C++20
This CL addresses the review comments for
https://webrtc-review.googlesource.com/c/src/+/261221
in the downstream cherry-pick: https://crrev.com/c/4660950.

*   Always use size_t{} for casting.
*   Remove unneeded size_t casts.
*   Avoid using __x as it is reserved for the compiler.

Bug: b:217226507
Change-Id: I13c57cb69d7db066ac9a6dbd15b7f6de54abb613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311360
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Li-Yu Yu <aaronyu@google.com>
Cr-Commit-Position: refs/heads/main@{#40395}
2023-07-04 09:06:07 +00:00
Jan Grulich
e21745a78b Video Capture PipeWire: initialize pw_stream raw pointer member
We will not always initialize PipeWire stream when we fail early and in
such case we will end up cleaning VideoCaptureModulePipeWire instance
where we will attempt to free it even when it is not initialized.

Bug: chromium:1457131
Change-Id: Id78310485aa5ae5d72c2d0d753dd5318b1b673ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311261
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40390}
2023-07-03 12:47:42 +00:00
Artem Titov
2cf8eb9f78 Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
This CL will add AudioDeviceBuffer into the SUT increasing test coverage
for audio quality regression detection.

This reverts commit b035dcc0a274e6cdde3e0fc465244bc0e9e3d70e.

Reason for revert: reland with a fix

Original change's description:
> Revert "Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl""
>
> This reverts commit eeae96299784515f573379a64655eb07a5973a3a.
>
> Reason for revert: breaks WebRTC Chromium FYI ios-device
> https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/14896/overview
>
> Original change's description:
> > Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
> >
> > This reverts commit 69c8d3c843326aff9dee32cc639741c1cd7f8ae9.
> >
> > Reason for revert: Reland with a fix
> >
> > Original change's description:
> > > Revert "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
> > >
> > > This reverts commit e42bf81486d2f08b6dcbf1442287202e937ce52b.
> > >
> > > Reason for revert: Breaks iOS simulator bots and thus blocks chromium roll, https://chromium-review.googlesource.com/c/chromium/src/+/4433814
> > >
> > > Original change's description:
> > > > Migrate TestAudioDeviceModule on AudioDeviceModuleImpl
> > > >
> > > > Bug: b/272350185
> > > > Change-Id: Ia3d85d6fa3b0d4809e987a39d60d3eb022687132
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300363
> > > > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#39877}
> > >
> > > Bug: b/272350185
> > > Change-Id: I1e3b542fc1278797f283afedeae01cbb7412d353
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301701
> > > Commit-Queue: Jeremy Leconte <jleconte@google.com>
> > > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > > Reviewed-by: Jeremy Leconte <jleconte@google.com>
> > > Auto-Submit: Christoffer Jansson <jansson@google.com>
> > > Owners-Override: Christoffer Jansson <jansson@google.com>
> > > Cr-Commit-Position: refs/heads/main@{#39881}
> >
> > Bug: b/272350185
> > Change-Id: I809466306b2e1fd54c44b90311059c98a53ef8ee
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301704
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39936}
>
> Bug: b/272350185
> Change-Id: If0a10717bf14a0a618e52728fc3a61b9c55f3bd2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303460
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Owners-Override: Jeremy Leconte <jleconte@google.com>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#39947}

Bug: b/272350185
Change-Id: I7cf7c6bc25561f4eb722957f318c2af9ce20726d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311101
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40387}
2023-06-30 16:15:06 +00:00
Yaowen Guo
6fc700ec3d Rland "Revert "Reland "Reland "Delete old Android ADM.""""
This reverts commit 7534ebd2bf59212cce5e010dd6ed9b3bc944818e.

Reason for revert: Downstream projects have been updated, try it again.

R=perkj@webrtc.org

Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
2023-06-30 13:10:12 +00:00
Artem Titov
415e30fdbb Extract some test code out from audio_device_impl into own targets
Bug: b/272350185, webrtc:15081
Change-Id: Ic7a0c8b335bb60d7975a490896da92aa95575ca5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310784
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40384}
2023-06-30 10:33:31 +00:00
Tony Herre
b4062e5611 Add a setter for RTPTimestamp on TransformableFrameInterface
Move the SetRTPTimestamp method from TransformableAudioFrameInterface
to the base class, so that RTPTimestamps can also be modified on encoded
video frames.

Bug: webrtc:14709
Change-Id: I355be527c2be201c9201e04c431394c962237140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310781
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40378}
2023-06-29 13:42:15 +00:00
Alfred E. Heggestad
be90237a0a rtp_rtcp/source: fix some minor typos
Bug: None
Change-Id: Iedc6e3b7e0cb92256255afc4cd76c66b01099c1e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40362}
2023-06-27 21:32:46 +00:00
Emil Lundmark
365a5717ae Use absl::optional instead of std::optional
We haven't switched to the std spelling in WebRTC yet.

Change-Id: If21a6ee9ac19be8ce959b3192eb8de044048f157
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310501
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40356}
2023-06-27 10:41:33 +00:00
Jakob Ivarsson
269a3d415e Mix audio from all sources.
Removes the top 3 filtering based on frame energy. This behaviour is
unexpected for many application developers and the platform should not
have such arbitrary limitations. Developers can still implement top-N
filtering using WebAudio or an SFU (recommended to increase
scalability).

Performance is not really a concern in this case since decoders on all
receive streams are called regardless if they are mixed or not
(assuming packets are received).

This also fixes glitches caused by the current implementation since
sources are not ramped out.

Bug: chromium:1446655,webrtc:13818
Change-Id: I179a6d68d2517b94ff2d99ec269031a54e5099e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310180
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40349}
2023-06-26 17:48:50 +00:00
Andreas Pehrson
dcf600d7a5 In VideoCaptureDS::{Start|Stop}Capture do not lock
Sequence- and RaceCheckers ensure thread safety, and show that these
locks protect nothing.

Bug: webrtc:15181
Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40345}
2023-06-26 10:13:33 +00:00
Danil Chapovalov
8beb6314ef Pass and process capture time through SendPacketObserver with Timestamp type
Bug: webrtc:13757
Change-Id: Icc9f650590640f402ca9004171bbddaf918c78d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308682
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40339}
2023-06-22 17:16:41 +00:00
henrika
58e97b8600 Removes AllowWgcDesktopCapturer feature flag
This flag is no longer used in Chrome and can now be removed.

Bug: chromium:1314868
Change-Id: Id91b3352dc7ec0543d54894cc206a6e0c7667e9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309960
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40337}
2023-06-22 16:07:51 +00:00
Andreas Pehrson
eee10391ca In VideoCaptureImpl and subclasses add thread and lock annotations
This annotates all unannotated members in VideoCaptureImpl and its
subclasses with either of:
- api_checker_: access on the api thread only
- capture_checker_: access in callbacks/on the capture thread while
                    capture is active, on the api thread otherwise
- a Mutex if it is already protected by it

Bug: webrtc:15181
Change-Id: I5084e7752a4716c29b85a9b403a88696f66d811f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305647
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40335}
2023-06-22 13:34:40 +00:00
henrika
c3a74024bf Splits AllowWgcDesktopCapturer into AllowWgc[Window/Screen]Capturer flags
This CL allows the users to now enable/disable WGC capturing support
for Window and Screen sharing independently.

Bug: chromium:1314868
Change-Id: Ieeb15539434dac2caf29c515aa7c5dbb7abcc5df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309560
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40330}
2023-06-21 19:25:23 +00:00
Sergey Silkin
d7c7b07c5d Account for codec type when accessing codec specific settings
Bug: none
Change-Id: Ic60414d7a8cd2e40f8c3855fd4ceed09ea4d7c07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305784
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40324}
2023-06-21 11:26:04 +00:00
Jesús de Vicente Peña
f80cf81435 Changing the pre echo configuration default.
Bug: webrtc:14205
Change-Id: I17add3bf19c599f170ffe98d0da0a561794591c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309481
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40319}
2023-06-20 14:46:44 +00:00
Philipp Hancke
64d384ff29 Fix logging of unsupported video type
BUG=webrtc:15257

Change-Id: I9b51ed39d6010f49f307a40b20eec801eaf088bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308881
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40317}
2023-06-20 13:12:27 +00:00
henrika
bb917acb10 Fixes crash in WgcCaptureSession::ProcessFrame
This change fixes a minor issue where we previosuly assumed that the
following was true:

RTC_DCHECK_EQ(map_info.RowPitch, current_frame->stride())

It turns out that this is not always the case when sharing a window
where the stride can sometimes be a few bytes smaller than the
rowpitch.

The code is behind a command-line flag and no tests are affected.
Given limited review resources I therefore plan to bypass the CQ.
I know that it is not recommended but the change has been tested
locally on two different Windows platforms and it does avoid an
existing crash.

Code-Review: alcooper@chromium.org
No-Try: true
Bug: chromium:1421242
Change-Id: I01e7105a6f9fca7ce1349a57635dd373c28d160b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309342
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40308}
2023-06-19 14:39:39 +00:00
Danil Chapovalov
b4969d0036 Remove unused dependencies in rtp_rtcp
Bug: None
Change-Id: If0a14f54e55550f38b178bb6412198559677d217
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309320
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40307}
2023-06-19 11:51:27 +00:00
Danil Chapovalov
4d2a219436 Change RTCPReceiver::GetAndResetXrRrRtt to return TimeDelta
Bug: webrtc:13757
Change-Id: Iaf3a540fbab51990fb6b983912e3b8c1bb1aaa81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308940
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40302}
2023-06-16 17:09:00 +00:00
henrika
6c453b7d59 Light-weight detection of static content when using WGC
This CL adds a light-weight detection of "frame content has changed
since last frame" to an existing pass where bytes are copied from a
texture to a DesktopFrame. The resulting boolean can then later be
used to bypass a full detection of if the content is static or not.
As a result, we only check for static content for a small fraction of
all captured WGC frames and this reduces the total load when 0Hz
is enabled for WGC.

Both WGC and 0Hz support for WGC is still behind a flag.

Bug: chromium:1421242
Change-Id: If9e3721c60a244a3919758fe861d56d4b54cb039
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308821
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40299}
2023-06-16 11:00:34 +00:00
Alfred E. Heggestad
b37f864e22 Flexfec: add logging of received length.
Co-authored-by: Sun Shin <sushin@nvidia.com>
Bug: None
Change-Id: I676c6e6ed52c7ddcd42bfe3d6cfb1a377b2e7dbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307820
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40291}
2023-06-15 14:22:27 +00:00
Andreas Pehrson
823c70209e In VideoCaptureV4L2 use requested/configured capability
VideoCaptureV4L2 has some members that are set in StartCapture during
configuration of the device, but later accessed both on the capture
thread and on the api thread (same as StartCapture) in
CaptureSettings(), which can be called at any time. This is safe because
they are written only on the api thread when the capture thread is not
running. However, there is no helper class that separates the read and
write modes to allow annotations and static analysis of the thread
access of these members.

This commit allows annotations to be added by making VideoCaptureV4L2
use:
- VideoCaptureImpl::_requestedCapability for storing those members
  requested through StartCapture(), to allow access on the api thread
  through CaptureSettings().
- A new member configured_capability_ to replace those members mentioned
  in the first paragraph above. Writes to it happen only in
  StartCapture() and StopCapture(), while reads happen exclusively on
  the capture thread in between.

Bug: webrtc:15181
Change-Id: I27e0f578e6ac2a2e6b0e34fbabfe4f743b296321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306122
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40290}
2023-06-15 14:16:59 +00:00
Andreas Pehrson
bd14a73f81 In VideoCaptureModulePipeWire lock around started_
CaptureSettings() can read started_ on the api thread at any time. But
it is written and read in pipewire callbacks, on other threads. A lock
seems suitable.

Bug: webrtc:15181
Change-Id: I3d26f02408a4e56921b955f059e504ffa9b8cae9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306121
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40286}
2023-06-15 09:58:29 +00:00
Andreas Pehrson
6bb12e5732 In VideoCaptureModulePipeWire split frameInfo_ usage
frameInfo_ is used on multiple threads. This commit splits it into:
- VideoCaptureImpl::_requestedCapability for writing what was requested
  in StartCapture() and for reading in CaptureSettings(), on the api
  thread only.
- A new member configured_capability_ (renamed from frameInfo_) for
  accesses in callbacks, or on the api thread when no callbacks can
  happen.

Bug: webrtc:15181
Change-Id: I105d8adfde52320e43ffe95fe23e11d028c80684
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306120
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40285}
2023-06-15 09:01:25 +00:00
Andreas Pehrson
8f1903e3cf In VideoCaptureImpl lock api_lock_ when accessing apply_rotation_
A comment says SetApplyRotation could deadlock if grabbing the lock, but
it does not make any calls under the lock so that is impossible, unless
the caller of SetApplyRotation involves a second lock that the callback
tries to grab, in which case it appears to be a problem of the caller.

Bug: webrtc:15181
Change-Id: Ie16cb01ffb84e9118dd5c87863c29bd107a6c94e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305646
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40279}
2023-06-14 13:49:09 +00:00
Yosef Twaik
61deed5696 Change flexfec header writer to finalize header according to updated RFC
Change implementation of `FinalizeFecHeader` to write the FEC header
for multiple ssrcs according to the updated RFC.

Change-Id: I280964b2e53c3579f348fbd42815c966840375ac
Bug: webrtc:15002
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307601
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40270}
2023-06-13 14:30:09 +00:00
Yosef Twaik
bde7c6ad11 Change FinalizeFecHeader to receive list of streams
Changed FinalizeFecHeader to recieve a list of `ProtectedStream` struct,
in order to prepare for receiving multiple ssrcs to protect in the same
FEC packet header. Implementation of the multistream case will follow in
next CL.

Change-Id: I697ef9172a07797a6f500b9ec3a9916f8f45bc04
Bug: webrtc:15002
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307620
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40269}
2023-06-13 13:02:14 +00:00
Per K
48c44e3543 Ensure RtpSenderEgress run on worker queue
VoipCore still use RtpSenderEgress::NonPacedPacketSender, therefore
packets sent using NonPacedPacketSender::EnqueuePackets are proxied
to the worker thead.
When NonPacedPacketSender is used, the Pacer already guarantee that packets are sent on the worker queue.

Lock is removed from RtpSenderEgress and instead calls must be made on
the worker thread.


Bug: webrtc:15209
Change-Id: Iaf03377ad8a037ecedbbe588a4c1e8e4eadacd81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306960
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40252}
2023-06-09 13:40:35 +00:00
Per K
2b5beb98dd Set correct absolute send time on reordered packets
Allow absolute send time to go back in time as long as there has not been a large gap in arival time. Use the first packets arival time as time base.


Bug: b/282153758, webrtc:15230
Change-Id: I8663079ab9c202079bf8db303353918d46ba1d98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308142
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40251}
2023-06-09 12:32:05 +00:00
Björn Terelius
4ee5e5f294 Disable VideoCaptureTest due to flakyness
Bug: webrtc:15229
Change-Id: I3303b13be74d9eae5c52ecb2b920c23ac7d063d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308220
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40244}
2023-06-08 11:15:31 +00:00
Jakob Ivarsson
89f64b994f Make packet info optional and only set for primary packets in NetEq.
Header metadata such as audio level and capture time doesn't make sense
for redundant payloads (i.e. RED and inband-FEC).

It is assumed that one of the parsed payload timestamps will correspond
to the RTP header timestamp.

This fixes a bug where capture time and CSRCs were not set after
parsing RED packets.

CreateRedPayload test function is adapted from red_payload_splitter_unittest.cc

Bug: webrtc:15185
Change-Id: Iba58772499b6d760f516854999b60511896b053c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305700
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40240}
2023-06-07 18:17:03 +00:00