BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed
Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
Fixing a bug due to which the analog controller could not be disabled.
AudioProcessing::Config::GainController1::AnalogGainController::enabled
was ignored and therefore `recommended_stream_analog_level_locked()` in
APM was returning the level recommended by `AgcManagerDirect`.
When the analog controller is disabled, `stream_analog_level()` now
returns the last value set via `set_stream_analog_level()`.
However, the analog controller code is still running and, in particular,
the existing metrics are reported as if the controller were enabled.
This choice was made to reduce the risks of adding bugs in the digital
compression gain selection part, which is tied to the analog
controller. The metric drawback will be solved in a follow-up CL.
Additional changes:
- log `WebRTC.Audio.GainController.Analog.Enabled` when
AGC1 is created or when its config changes
- first step to replace "analog level" with "input volume"
Bug: webrtc:7909, b/180019868
Change-Id: I28ce9556dd98f3dd9ad546799406c55478730435
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270663
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38044}
For the linked test case that speeds up chromium fuzzer by ~13%
Run time decrease from ~50 seconds to ~44 seconds
Bug: chromium:1357929
Change-Id: I702edf4fda7afd31a5288621220dac063f764ced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274601
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38038}
In some upcoming use cases we might wish to flush pending
retransmissions from the pacer queue. In order to not make those packets
forever inaccessible this CL adds a way to clear their "pending" status
from the packet history.
Bug: webrtc:11340
Change-Id: I9aac44125899a7f1e5a5e5be3390ac07b1e661ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38037}
The Chrome Remote Desktop team is looking to support AV1 profile-1
w/ I444 for screen sharing however only I420 is currently supported.
This CL adds I444 support for the Dav1dDecoder, which appears to be
the preferred decoder and adds profile-1 to the
InternalDecoderFactory when the Dav1dDecoder is being used.
I've tested this CL using a CRD host w/ I444 enabled and it seems to
work as expected, though I've only tested on a debug build so I plan
to do some perf testing once this is available in a release build.
Bug: chromium:1329660
Change-Id: I2b8b7b7fd530727456ac5c46e694e7dbad6deff2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273986
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#38022}
Having the minimum value as the default makes more sense than maximum.
Bug: b/232103634
Change-Id: Ia6a97f7a2a47bb74ed3b3316d95a1c6d00e2c16b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274260
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38021}
The constants are reordered to match the order they are used
when a sample is inserted into the filter. Some of the constants
are renamed to better describe their usage. No functional changes
are intended. Future CLs will add configurability to some of these
constants.
Some basic unit tests are also added.
Bug: webrtc:14151
Change-Id: I731a9cad3d8aeab06ccfa7d212cd160a2d2da27b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274122
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38019}
This makes it easier to read the code, and to visually verify
that the computations make sense from a dimensional perspective.
No functional changes are intended.
Bug: webrtc:14151
Change-Id: Ic059f3c53618903d63a270b901ac5cec6139d2c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274120
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38006}
Change ProbeController field trial to also probe when loss limited but probe at the current estimate.
Bug: webrtc:14392
Change-Id: I8b30e316b935a0f2c375e2204a8e33e6671eb956
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273901
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38004}
Now that we've added the ability to open and close the PipeWire picker
to the DesktopCapture interface, we can split the picker back into a
Window and a Screen picker rather than just having the one combined
picker. This will allow for a better user experience, as we can create
a picker targeted to what the users actually want to share.
Bug: chromium:1351570
Change-Id: I5bec22912ae01c1b0b0709a4979b4698226a2a66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273541
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#38000}
This CL updates the file and class naming, based on the naming discussion in
https://webrtc-review.googlesource.com/c/src/+/265877.
Concretely, that means replacing "delta" with "variation" in the name.
Bug: webrtc:14151
Change-Id: I43e74b1d25f9441015445101f3eb6a7b52f3adba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273960
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37999}
Adds an Observer class to the DelegatedSourceListController so that we
can expose user-driven events from the delegated source list. This will
allow embedders to update their UI in response to changes to the state
from the delegated source list. Currently these events are: selection,
cancelled, and error.
Bug: chromium:1351576, chromium:1351577
Change-Id: I248bdb1c4410147ca1a0663eafda40b6b9345801
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272622
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37986}
This will allow to catch issues (like the one that caused the revert
[1]) at CQ time.
[1] - https://webrtc-review.googlesource.com/c/src/+/273486
Bug: None
Change-Id: Ib12c15dcdc3e2a358d40c1a2ffabfbf42274e978
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273660
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37982}
This reverts commit 0098a441e3.
Reason for revert: Fix chromium build break
Original change's description:
> Revert "Add plumbing to control PipeWire picker visibility"
>
> This reverts commit fbea8c5196.
>
> Reason for revert: Breaks WebRTC import into Chromium, e.g:
> https://chromium-review.googlesource.com/c/chromium/src/+/3863998/
>
> Original change's description:
> > Add plumbing to control PipeWire picker visibility
> >
> > Introduces the notion of a "delegated source list" and corresponding
> > controller. This is used by desktop capturers (currently just the
> > PipeWire capturer), who control selecting the source through their own
> > (often system-level) UI, rather than returning a source list with all
> > available options that can then be selected by the embedder.
> >
> > Adds a method to get the controller which serves to also tell embedders
> > if the capturer makes use of a delegated source list. The controller
> > currently allows the embedder to request that the delegated source list
> > be shown or hidden, and will in the future be used to expose events
> > from the source list (e.g. selection, dismissal, error).
> >
> > Bug: chromium:1351572
> > Change-Id: Ie1d36ed654013f59b8d9095deef01a4705fd5bde
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272621
> > Reviewed-by: Mark Foltz <mfoltz@chromium.org>
> > Commit-Queue: Alexander Cooper <alcooper@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#37956}
>
> Bug: chromium:1351572
> Change-Id: I06f76ab9c8bc1aa303dae177d48698951fdc5ecd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273703
> Auto-Submit: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37964}
Bug: chromium:1351572
Change-Id: I9e5e691746b81517bf0e211d0ad5a23371ab29ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273685
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37972}
Ensure initial second probe can be disabled.
Can configure separate probe duration if the network state estimate is known.
Can probe immediately if network state estimate increase more than a factor
Bug: webrtc:14392
Change-Id: Iefb980f0b10c7c51db62793c3bd3f187fc67593d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273349
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37966}
This reverts commit fbea8c5196.
Reason for revert: Breaks WebRTC import into Chromium, e.g:
https://chromium-review.googlesource.com/c/chromium/src/+/3863998/
Original change's description:
> Add plumbing to control PipeWire picker visibility
>
> Introduces the notion of a "delegated source list" and corresponding
> controller. This is used by desktop capturers (currently just the
> PipeWire capturer), who control selecting the source through their own
> (often system-level) UI, rather than returning a source list with all
> available options that can then be selected by the embedder.
>
> Adds a method to get the controller which serves to also tell embedders
> if the capturer makes use of a delegated source list. The controller
> currently allows the embedder to request that the delegated source list
> be shown or hidden, and will in the future be used to expose events
> from the source list (e.g. selection, dismissal, error).
>
> Bug: chromium:1351572
> Change-Id: Ie1d36ed654013f59b8d9095deef01a4705fd5bde
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272621
> Reviewed-by: Mark Foltz <mfoltz@chromium.org>
> Commit-Queue: Alexander Cooper <alcooper@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#37956}
Bug: chromium:1351572
Change-Id: I06f76ab9c8bc1aa303dae177d48698951fdc5ecd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273703
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37964}
We might be potentially blocking PipeWire initialization with call to
pw_thread_loop_wait() and waiting undefinitely for response in case
there is a fatal error.
Bug: webrtc:13429
Change-Id: If169e04f75a7d24a03a0fcd0da9ffaba8c0e2ef7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273481
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37959}
Introduces the notion of a "delegated source list" and corresponding
controller. This is used by desktop capturers (currently just the
PipeWire capturer), who control selecting the source through their own
(often system-level) UI, rather than returning a source list with all
available options that can then be selected by the embedder.
Adds a method to get the controller which serves to also tell embedders
if the capturer makes use of a delegated source list. The controller
currently allows the embedder to request that the delegated source list
be shown or hidden, and will in the future be used to expose events
from the source list (e.g. selection, dismissal, error).
Bug: chromium:1351572
Change-Id: Ie1d36ed654013f59b8d9095deef01a4705fd5bde
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272621
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37956}
Those never existed, were likely a copy-paste error in the spec
that we somehow inherited.
Bug: webrtc:11607
Change-Id: Ib4a038f061123e879f1099656273f6392f092213
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273485
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37953}
Replace most instances. SetAlrStartTime is set as is should be cleaned up together with the callsite.
Bug: webrtc:14404
Change-Id: I8ec532828ef665afbf08f0943465a429ab40baa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273300
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37932}
This adds a (default off) flag which makes retransmissions be processed
immediately, just like audio packets normally are.
This might increase send rates and thus losses in some cases, but will
also reduce retranmission delays especially when timer slack or bursting
is used. Usefuleness TBD via experiment.
Bug: chromium:1354491
Change-Id: Icaa83125bfb30826ce72e6e786963d411e05ea57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272483
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37926}
Add field trial to not probe if loss based limited
If both Alr probing and periodic probing of networkstate estimate is enabled, probes are limited by the network state estimate * factor controlled by field trial.
Bug: webrtc:14392
Change-Id: I46e1dbdd8b14f63a7c223b4c03c114717b802023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272805
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37915}
And add a unit test that verifies that next probe time is set at is
the expected if the recommended probe size is used.
Bug: webrtc:14392
Change-Id: I239bb3a1c8eefc85509aacc82037c64e3ce49ed7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272648
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37901}
The libyuv fix for this issue was submitted > 2 months ago so it
should be safe to remove the workaround from webrtc.
Bug: chromium:1330019
Change-Id: Ibcf3818739673005e40d7ef9917c5f5692c50df4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272861
Commit-Queue: Joe Downing <joedow@google.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37895}
I would like to run a separate capturer for each desktop on Linux and
I ran into the DCHECK in XErrorTrap when I was prototyping that
solution. I addressed it by using a Mutex and then experienced and
occasional hang when capturing which I traced down to
SharedXDisplay::ProcessPendingXEvents(), this is a shared display
instance used by each unique capturer instance so I added a mutex
there as well.
I ran 2 capturer instances concurrently for well over an hour and did
not experience any hangs or capture artifacts.
Bug: webrtc:2022
Change-Id: Ia6778cae4bbae48886fe45f2991f02e0ea08fef6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271920
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#37892}
This reverts commit bc8a62b244.
Reason for revert: reverting per
https://bugs.chromium.org/p/webrtc/issues/detail?id=14368#c5
This needs more careful consideration and should be put behind a finch flag or origin trial
Original change's description:
> Enable Multithreaded H264 Encoding For OpenH264
>
> Re-enabled multithreaded encoding using OpenH264, as the issue described in crbug.com/583348 no longer applies.
>
> Bug: webrtc:14368
> Change-Id: I5ae768a6edf3b40d99c13fb4ee4662626c993a66
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271820
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37837}
Bug: webrtc:14368
Change-Id: Icebedfe4eb8e3901670b9f90e229379fca95206b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272600
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37878}
In case ScreenCast portal fails right at the beginning, we need to check
the response before trying to get session handle to avoid accessing
non-existing portal data.
Also on early failure do not continue making source request if we failed
before and don't have session handle.
Bug: webrtc:13429
Change-Id: I2bfbd2c6e96e3cda1e62aa9dc07f66d4c7496b53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272400
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37872}
This moves the ownership away from VideoReceiveStream2 and closer to
VCMDecoderDataBase. That facilitates unregistration (upcoming change)
without recreating receive streams.
Bug: none
Change-Id: I812175134730a0ffbf7077fd149c8489481c73d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272481
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37866}
This removes the field trial WebRTC-Pacer-UsePrioritizedPacketQueue.
Bug: webrtc:11340
Change-Id: I9a7ee64ff5ae3ad1fee6ed5d552ec681e3b4b534
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272240
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37852}
This is a follow up to this CL
https://webrtc-review.googlesource.com/c/src/+/269223
which unintentionally prevents the WindowCapturerWinGdi from returning
permanent errors.
Bug: webrtc:14265
Change-Id: I8eb9f8852fb6247a045d32e407ebdd5f45e6aa9d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271880
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37847}
This experiment will tell if we still see the performance gains that we
saw with the "bursty slacked pacer" even if we don't apply slack (since
the "slack without burst" showed little impact at Stable).
The hope is that without slack all quality regressions will go away but
that bursting will still provide the desired performance benefits.
Bug: chromium:1354491
Change-Id: I95f05d040713addaaa1856c8e374a01c27311612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272366
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37845}
For now use doubles as units in api/units have insufficient precision for jitter estimation.
Bug: webrtc:14381
Change-Id: I5a691b6a404b734a5bef11d677b72040bc02ff0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272367
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37841}
Now Configure(), Decode() and Release() calls to the decoders should
all happen on the decoder thread. Added thread checkers to verify.
Bug: None
Change-Id: I2a1cf2cf7f3c3c7c50e382d82a3638e916ed9c34
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272368
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37840}
Re-enabled multithreaded encoding using OpenH264, as the issue described in crbug.com/583348 no longer applies.
Bug: webrtc:14368
Change-Id: I5ae768a6edf3b40d99c13fb4ee4662626c993a66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271820
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37837}