Commit graph

6227 commits

Author SHA1 Message Date
Jesús de Vicente Peña
e7478182ac Penalization of large delays on the initial phase.
Bug: webrtc:14919
Change-Id: Iba00b2782b7e7c3dbd345a94aba541fad8c979ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294289
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39364}
2023-02-22 07:11:58 +00:00
Björn Terelius
f2c67e2253 Update documentation links in modules/desktop_capture/linux/wayland/screencast_portal.(cc|h)
Bug: webrtc:14917
Change-Id: I40e8f011b7263675aab99c452cda8f89ad137cc5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294283
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39361}
2023-02-21 20:12:16 +00:00
Evan Shrubsole
262b2d8509 Delete WebRTC-SlackedTaskQueuePacer experiment
R=hbos@webrtc.org, sprang@webrtc.org

Bug: webrtc:14913
Change-Id: I1ea9d5bda798ea01fa9ec2a9b8d96cb50ccb9ec2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293920
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39356}
2023-02-21 13:11:49 +00:00
Michael Olbrich
cd5c62362f Build video capture implementation for chromium
It will be used to support cameras via xdg desktop portal / pipewire in
chromium. This includes exporting additional classes that will be used
by chromium.


Bug: webrtc:13177
Change-Id: I7524ffb47ed2eb7af1de4d7fd741fbb15277a0a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264553
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39350}
2023-02-20 15:29:43 +00:00
Henrik Boström
fbd0ddb32e Introduce WebRTC-VideoEncoderSettings/encoder_thread_limit:X.
As requested by a CEF hosted application (https://crbug.com/1406331)
who want to be able to limit the number of threads in a controlled
environment, this CL adds a flag to control the max limit per encoder.

For plumbing-reasons, this is placed in VideoEncoder::Settings but
with a note that this is considered an experimental API with limited
support. For now only LibvpxVp8Encoder uses it and there are no plans
to roll this out.

I have manually confirmed this is working with printf debugging,
--force-fieldtrials=WebRTC-VideoEncoderSettings/encoder_thread_limit:2
and https://jsfiddle.net/henbos/2bd6m7Lt/

Bug: chromium:1406331
Change-Id: Ib02bd83e2071034874843d3aaa0d3b0adc5bbf46
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293960
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39349}
2023-02-20 14:01:32 +00:00
Jakob Ivarsson
91e6cd2fb3 Use generated_noise_samples to count consecutive expands.
This is a pure noop refactor that removes duplicated state.

It also correctly keeps track of generated samples when transitioning from CNG to expand mode when CNG timeout is used.

Bug: webrtc:12790
Change-Id: Ieca559bd771c42566e5d4f8837235cb25b1420bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293862
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39334}
2023-02-17 16:27:53 +00:00
Jakob Ivarsson
48d7842259 Disable stop CNG after a timeout.
This is still a behavior that we want, but a more careful rollout is needed.

Bug: webrtc:12790
Change-Id: Ic74c7b4945c0cdeda2b17f52301069424ad91162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293860
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39333}
2023-02-17 16:09:04 +00:00
Rasmus Brandt
86163248f4 Rename CodecTimer -> DecodeTimePercentileFilter.
The CodecTimer is not a codec timer, it's more like a decoder stopwatch with a percentile filter wrapped around it. Since the purpose of the class is to provide an estimate for how much decode delay to add when determining the render timestamp of a frame, let's rename this class to `DecodeTimePercentileFilter`.

No functional changes are intended.

Bug: webrtc:14905
Change-Id: I48c99e4f500c4f9e1a2a20b0afe72d6e76c5192d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293462
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39332}
2023-02-17 13:52:38 +00:00
Danil Chapovalov
3970fa85b3 Delete few stale TODOs where no action is planned
encrypted_video_payload already allocates enough bytes - first SetSize query such size from the frame_encryptor_

Minimizing VP9 when generic descriptor is used might be harmful in multi-participant scenario where frame needs to be send to a participant without generic descriptor support and thus require complicated restoration of the VP9 specific descriptor.

No-Try: true
Bug: None
Change-Id: I5f2c32c2c9ae745794dfaaa4aec4c5898dff78f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293820
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39327}
2023-02-16 14:44:09 +00:00
Sergey Silkin
72b99a1128 Test Android HW codecs
Bug: b/261160916, webrtc:14852
Change-Id: Iebeab244a9ca6ae196735016064ccd056b7c888e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293401
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39326}
2023-02-16 14:01:52 +00:00
Wan-Teh Chang
f6eb9d64b2 Declare kMinimumFrameRate for AV1 codec as double
The kMinimumFrameRate constant is only used in a comparison with
RateControlParameters::framerate_fps, which is of the double type.
Declare kMinimumFrameRate as double to match.

Note: The kMinimumFrameRate constant was added in
https://webrtc-review.googlesource.com/c/src/+/170360.

Bug: webrtc:11404
Change-Id: I11769867d4e52a720219c8a0ade8e8b74d13ca86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293384
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39320}
2023-02-15 17:27:34 +00:00
Henrik Boström
2e540a28c0 Introduce EncodedImage.SimulcastIndex().
As part of go/unblocking-vp9-simulcast (Step 1), EncodedImage is being
upgraded to be able to differentiate between what is a simulcast index
and what is a spatial index.

In order not to break existing code assuming that "if codec != VP9,
SpatialIndex() is the simulcast index", SimulcastIndex() has fallback
logic to return the value of spatial_index_ in the event that
SetSimulcastIndex() has not been called. This allows migrating external
code from (Set)SpatialIndex() to (Set)SimulcastIndex(). During this
intermediate time, codec gates are still necessary in some places of
the code, see TODOs added.

In a follow-up CL, after having fixed dependencies, we'll be able to
remove the fallback logic and rely on SimulcastIndex() and
SpatialIndex() actually being the advertised index and "if codec..."
hacks will be a thing of the past!

Bug: webrtc:14884
Change-Id: I70095c091d0ce2336640451150888a3c3841df80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293343
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39318}
2023-02-15 15:02:57 +00:00
Tony Herre
daf29e461e Create a Header from metadata in clone of encoded sender video frames
This means sender frames cloned from received frames have a valid
header from the start, rather than callers needing to later call
SetMetadata.

Bug: webrtc:14708
Change-Id: Ie25fbd6609928a9555b6db688ab451ff61fa7147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293041
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Tove Petersson <tovep@google.com>
Cr-Commit-Position: refs/heads/main@{#39317}
2023-02-15 13:27:53 +00:00
Sam Zackrisson
56c67555f1 AEC3: Delete render delay buffer alignment killswitch
The code has been running in Chrome since 2020 and ChromeOS since 2022 (https://crrev.com/c/3452884) without issues.

Bug: webrtc:11803
Change-Id: I0c572d362b1f52b4591c7790e11a87c1a1ad1a79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293342
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39316}
2023-02-15 12:57:04 +00:00
Johannes Kron
f4c04286bc Fix WebRTC.Screenshare.DesktopCapturerFullscreenDetector logging issue
The histogram WebRTC.Screenshare.DesktopCapturerFullscreenDetector
incorrectly counted every time a presentation application was shared
instead of only counting sessions where the presentation was
presented in fullscreen. This bug affected Windows, macOS works as
intended.

Bug: chromium:1348011
Change-Id: I9e84e9d1f4310703ba94e2af2e35a52d74a25842
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293461
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39314}
2023-02-15 12:40:12 +00:00
Erik Språng
ea41da2f9f Remove unused field trial WebRTC-Pacer-MinPacketLimitMs
Bug: None
Change-Id: Ifa7dc8a58846578531978fb1e281fc8634717028
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293348
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39313}
2023-02-15 12:39:07 +00:00
Diep Bui
2badc0907e Fix pending time calculation in goog_cc.
Packet pending time should be diffed between max_revc_time and receive time as it is done at line 436. The current implementation makes pending time to be negative.

Bug: webrtc:14850
Change-Id: Ie6590ef11caa67254750591abb6bf72679d76941
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292461
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39311}
2023-02-15 09:55:12 +00:00
Diep Bui
4dd3260698 Do not probe if rtt is higher than the limit defined in RTTBasedBackoff
Bug: webrtc:14754
Change-Id: If7e0426fb8e568e3d51a767df12500f181fa86d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292841
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39308}
2023-02-14 08:53:23 +00:00
Joe Downing
60795e8c7a Re-initialize the DXGI capturer when the DPI of the monitor changes
I am updating Chrome Remote Desktop to apply a scale factor when using
curtain mode (i.e. a loopback RDP session) and I've found that while
the changes are applied and the desktop is scaled, DXGI stops
producing frames.

This is essentially the same issue as crbug.com/1307357 except this
issue is occurring when the DPI is changed rather than the desktop
size.

The fix is to look at the effective DPI for the source being
captured (or the primary monitor when capturing the full desktop)
and then signaling an environment change when the DPI differs.

Bug: webrtc:14894,b:154733991
Change-Id: Id768d4a384434ba59e7396bc919d0ba30d0f6acc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292791
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#39305}
2023-02-13 18:26:29 +00:00
philipel
04e9354557 Remove deprecated VideoStreamDecoderInterface and FrameBuffer2.
Bug: webrtc:14875
Change-Id: I46ea21d9ed46283ad3f6c9005ad05ec116d841f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291701
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39304}
2023-02-13 16:25:00 +00:00
Sergey Silkin
5dd493b3da Do not use PostDelayedTask in video codec tester's pacer
PostDelayedTask doesn't guarantee task execution order. For example,
if you post two tasks, A and B, back-to-back using the same delay
there is no guarantee that A will be executed before B.

Re-implemented pacing using sleep(). Changed pacer to compute task
scheduled time instead of delay. Sleep time is calculated right before
task start. This provides better accuracy by accounting for any delays
that may happen after pacing time is computed and before task queue is
ready to run the task.

It is tricky to implement pacer tests using simulated clocks. The test
use system time which make them flacky on low performance bots. Keep
the test disabled by default.

Bug: b/261160916, webrtc:14852
Change-Id: I88e1a2001e6d33cf3bb7fe16730ec28abf90acc8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291804
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39302}
2023-02-13 15:07:16 +00:00
Byoungchan Lee
05873dcaa6 Makes use of the newer version of the RecordedDataIsAvailable mock
When I run these tests locally, Gmock complained about the incorrect
mock function call and caused the test to fail.

Bug: None
Change-Id: I37c9168650471b171a5d7f7b4e3a4c6c6225d618
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292920
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#39292}
2023-02-10 09:01:02 +00:00
Danil Chapovalov
5f798736e5 Delete stale TODOs related to VideoLayersAllocation extension
No-Try: true
Bug: webrtc:12000
Change-Id: I1ed3ece0eb000fe012ce5e26a6abaf640b422481
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292880
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39291}
2023-02-10 08:59:59 +00:00
Tony Herre
fd877d996f Consolidate TransformableVideoFrame mocks used inside webrtc
Also move the frame_transformer_factory_unittest build target into the
if(rtc_include_tests) block, so it's not compiled without the mock.

Bug: chromium:1414370
Change-Id: I12653b173b419ec20bfad904e24a4d965e7e7830
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292863
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39288}
2023-02-09 16:06:29 +00:00
Wan-Teh Chang
1f39162528 Fill fps allocation for LibaomAv1Encoder correctly
The elements of the fps_allocation vector are fractions of the maximum
frame rate. Each fraction is represented as an 8-bit unsigned integer,
where 0 = 0% and 255 = 100%.

The original code (added in
https://webrtc-review.googlesource.com/c/src/+/201384) sets the elements
of the fps_allocation vector to frame rates rather than frame rate
fractions. Perhaps fps_allocation could be renamed to avoid this kind of
confusion.

modules_unittests --gtest_filter=LibaomAv1EncoderTest.*

Tested: 
Change-Id: Icd050da3b3c2cff31913c3430f7b6b6e9829b9fa
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292784
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39286}
2023-02-09 16:00:55 +00:00
Danil Chapovalov
e1137d7201 Delete deprecated variant of IncomingRtcpPacket function
Bug: webrtc:14870
Change-Id: Ifc7a5f7d19d5555c8bbcba27ba08c019ca65b5c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292840
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39284}
2023-02-09 14:36:48 +00:00
Jesús de Vicente Peña
d234cef304 Handling NetEqSetMinimumDelay events in neteq_rtpplay.
Bug: webrtc:14763
Change-Id: I81a832209249468f8cec682b13bd025a1cec47b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291322
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39280}
2023-02-09 09:39:29 +00:00
Alexander Cooper
318cf28945 Fix Destruction inside WGC Callback
If we are notified of the destruction of the window before a
CaptureFrame call can fail, then we may end up attempting to destroy the
underlying WGC object inside it's own event handler. This can be
problematic, as the class itself may want to run other code. Instead,
we just unsubscribe and signal that any future CaptureFrame calls should
reject.

This also removes setting "is_capture_started_=false" in the item closed
handler, as all that served to do is cause the WgcCapturerWin code to
attempt to restart the capturer, and somewhat muddies up our metrics.

Bug: chromium:1413005
Change-Id: Ibccb7a2e7ce531ba80b4b331b9bc2cda0ff75f4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292762
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39275}
2023-02-08 23:19:22 +00:00
Tony Herre
b459deaf38 Add ssrc to VideoFrameMetadata used in encoded transforms
This allows callers to modify an encoded video frame's SSRC via the
setMetadata() call, which we'd like to do from Chrome, to allow using
an encoded frame from one PC on a different one.

Bug: webrtc:14709
Change-Id: Ia6b33761a3f63038f6eabbcd848916877e24454b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292380
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39266}
2023-02-08 06:34:27 +00:00
Olov Brändström
1f33a2ba3f Add capture timestamps to test audio device.
Absolute capture time extension did not work in tests that use test_audio_device. This change add capture timestamp to test audio device so absolute capture timestamp extensions can be sent in tests.

This make it possible to write tests for absolute header extension in Hamrit, and possible other test platforms as well.

Bug: None
Change-Id: Ie237f516ce0cccf43c32fe40da76a9d31f9fba53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292340
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39265}
2023-02-07 12:21:52 +00:00
henrika
b0e1cb254e Adds WebRTC.DesktopCapture.Win.DirectXCapturerResult UMA
This records high level errors, or success, encountered across the entire capture flow in the DXGI based capturer.

Using the same style as for WebRTC.DesktopCapture.Win.WgcCapturerResult

Bug: chromium:1400204
Change-Id: I7096d1790d7c2a23bbe29761b7dbf40426ce1e6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291707
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39259}
2023-02-04 12:26:02 +00:00
Johannes Kron
fd29662c61 Fix typo in histogram name
Bug: chromium:1348011
Change-Id: Ic4680339a110bf71afa7689bbc7acada1428811a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291806
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39258}
2023-02-03 21:02:46 +00:00
Philipp Hancke
5e7301f693 Remove rid and rrid from list of extensions that can be used for audio
BUG=webrtc:13279

Change-Id: I5d28d15bdb2b0d82b27c35069ca379631c7494cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39257}
2023-02-03 14:36:14 +00:00
Sergey Silkin
c6ff4bc793 Do not transfer ownership of codecs to tester
Passing of ownership of codecs to tester is not strictly needed. We may need to continue using a codec after test. For example, to check codec state or to use the same codec instance in next test.

Bug: b/261160916, webrtc:14852
Change-Id: I179b262116d7de76b8171f0409f943ad6d87433e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291802
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39256}
2023-02-03 14:29:43 +00:00
Tony Herre
be9b576188 Move video video receiver transformable frame to modules/rtc_rtcp/source
Step 1 of combining the sender and receiver types

Also moved the RtpFrameObject to rtp_rtcp/source, as it's heavily used
by the transformable receiver frame, I couldn't work out a better way
of managing the dependencies, and everything else seemed to work fine.

Bug: chromium:1412687
Change-Id: I55e816a0d7aa2962560ff9ebaf30ad63ab0b9810
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291710
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39255}
2023-02-03 12:59:19 +00:00
Johannes Kron
b311f6aba8 Add UMA histograms to track usage of fullscreen detection
Bug: chromium:1348011
Change-Id: I3219e74c49ff77e00b2224c8cf82f78d1e0fd9cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291708
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39254}
2023-02-03 12:16:08 +00:00
Michael Olbrich
f0be3bee1f Add pipewire/portal video capture support
This makes it possible to access cameras through xdg-desktop-portal and
pipewire.

For pipewire, a shared state is needed between the enumeration and the
creation of camera object. So a new API is needed with a shared options
object that holds the state and can be used to choose which backend to try.

Bug: webrtc:13177
Change-Id: Iaad2333b41e4e6fb112f4558ea4b623e59afcbd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261620
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39251}
2023-02-02 17:20:04 +00:00
Henrik Lundin
fad9a6dae7 Delete deprecated Create method and config from AudioCodingModule
The method and config are no longer used. This concludes the work to
break apart AcmReceiver and AudioCodingModule.

Bug: webrtc:14867
Change-Id: I87219749a1ea72a01b95e960d1f32292f7352c9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291801
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39250}
2023-02-02 17:06:29 +00:00
Sergey Silkin
6c60f72a6b Refactor video codec testing stats
This CL introduces VideoCodecStats and VideoCodecStatsImpl which provide baseline functionalities for storing, slicing and aggregation of encoded and/or decoded video frame statistics. To facilitate metrics logging (not implemented yet), SamplesStatsCounter is used for stream parameters.

VideoCodecStats/VideoCodecStatsImpl will replace existing VideoCodecTestStats/VideoCodecTestStatsImpl.

Bug: b/261160916, webrtc:14852
Change-Id: I0f96ce1ed9be3aee2a702804612524676c9882fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291323
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39248}
2023-02-02 15:56:40 +00:00
Danil Chapovalov
65ab5fd728 Cleanup RemoteEstimatorProxy::IncomingPacket
relax DCHECK and explain when it previous version could be hit.
Use concise versions of the GetExtension functions.
Reduce scope of the `lock_`

Bug: None
Change-Id: Iafc570ffe7e5b2dcbdfe166b26b140f7959c28c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291711
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39246}
2023-02-02 10:01:27 +00:00
Henrik Lundin
84f75699c6 Break apart AudioCodingModule and AcmReceiver
This change makes AudioCodingModule a pure sender and AcmReceiver a pure
receiver.

The Config struct is in practice no longer used by AudioCodingModule,
so a new definition is included in AcmReceiver. The old definition
remains in AudioCodingModule while downstream clients are being
updated.

Bug: webrtc:14867
Change-Id: If0d0b4214c5aa278cf6c85c5b62c6da644de20e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291533
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39244}
2023-02-01 16:09:26 +00:00
Harald Alvestrand
1f206b841e Use ArrayView in the IncomingRtcpPacket function.
The lowest level and some of the highest levels of this function are
already using ArrayView. Make this consistent throughout.
Use deprecation for the old API rather than deleting it, since upstream
may be using it.

Bug: webrtc:14870
Change-Id: If5e1a6e9802ecf7e8e3ec27befb5167ca9985517
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291706
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39241}
2023-02-01 12:19:03 +00:00
Tony Herre
16a8792e0a Propagate received video csrcs to encodedframe metadata
Before this, an empty list of CSRCs was always provided up to encoded
insertable streams transforms for remote video tracks, regardless of
the actual CSRCs on received frames. Audio already works correctly.

Bug: chromium:1411614
Change-Id: I51ab4dc5e67a1a35893fefff16c1f057e9047e6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291539
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39240}
2023-02-01 11:09:37 +00:00
mark a. foltz
0507fbdd05 [Desktop Capture] Remove disabled test.
The mouse_cursor_monitor_unittest.cc was disabled on all platforms, so
it can be deleted.

Bug: webrtc:3408
Change-Id: I294bc502993a5b0a369a60a751c72f72ec909dfc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291724
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39239}
2023-02-01 02:44:48 +00:00
Per K
217b384c1b Remove rtp header extension from config of Call audio and video receivers
These configurations are no longer used by call. Header extensions are identified once when demuxing packets in WebrtcVideoEngine::OnPacketReceived and WebrtcVoiceEngine::OnPacketReceived.

Change-Id: I49de9005f0aa9ab32f2c5d3abcdd8bd12343022d
Bug: webrtc:7135
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291480
Owners-Override: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39236}
2023-01-31 11:58:43 +00:00
Henrik Lundin
3541732527 Add a Config struct to AcmReceiver, and a ctor using it
This is a prerequisite step to break apart AudioCodingModule and AcmReceiver.

Bug: webrtc:14867
Change-Id: Iba589c7a31b6346ff4acb727793d84077162c8c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291534
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39235}
2023-01-31 10:28:31 +00:00
Artem Titov
a617867a45 Reland "Migrate WebRTC documentation to new renderer"
This reverts commit 0f2ce5cc1c.

Reason for revert: Downstream infrastructure should be ready now

Original change's description:
> Revert "Migrate WebRTC documentation to new renderer"
>
> This reverts commit 3eceaf4669.
>
> Reason for revert:
>
> Original change's description:
> > Migrate WebRTC documentation to new renderer
> >
> > Bug: b/258408932
> > Change-Id: Ib96f39fe0c3912f9746bcc09d079097a145d6115
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290987
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39205}
>
> Bug: b/258408932
> Change-Id: I16cb4088bee3fc15c2bb88bd692c592b3a7db9fe
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291560
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39209}

Bug: b/258408932
Change-Id: Ia172e4a6ad1cc7953b48eed08776e9d1e44eb074
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291660
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39231}
2023-01-31 09:30:04 +00:00
Salman
48220310ae shared_screencast_stream: Set WL capturer id
For frames captured and sent to the callback immediately, we
are not sending the capturer ID as we used to do in base capturer
pipewire. Adding the capturer id as well as the frame capture time
so as to keep the sent frame to be in sync with the
non-immediate-frame-send implementation.

Bug: chromium:1291247
Change-Id: I02693907928b9e770ea56f89b46c37f17f4bc4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291680
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Salman Malik <salmanmalik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39228}
2023-01-30 19:18:10 +00:00
Per K
dad91a69bf Send periodic TransportFeedback based on extension version
Today, behaviour is decided based on if transport sequence number v2 is
in the SDP answer. But it might be better to decide based on received
packets since it is valid to negotiate both extensions.

Another bonus With this solution is that Call does not need to know
about receive header exensions.
This is an alternative to https://webrtc-review.googlesource.com/c/src/+/291337

Bug: webrtc:7135
Change-Id: Ib75474127d6e2e2029557b8bb2528eaac66979f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291525
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39226}
2023-01-30 12:59:54 +00:00
Salman
6ff7713a70 base_capturer_pipewire: Send frames via callback
Earlier, we were relying on CRD to periodically do frame captures.
This is however not needed since Wayland captures are event based
and once the compositor has send the event/frame to us, we can just
handover the frame to a registered callback. This ensures that we
have a single frame clock that (i.e. one present in the compositor).

Without this change, there is a chance that CRD capture clock is run
out of sync with the compositor's clock and cause unnecessary frame
delays.

See the following ideal scenario, for example, where '+' indicates
when a frame is sent by the compositor and when CRD tries to capture
it. This assumes that the same clock cycle for both CRD and the
compositor, each cycle length is enclosed within | .... |).

Compositor Frame Ready | +... | | +... |
     CRD Frame Capture | .+.. | | .+.. |

In this case, when both the clocks are in sync, CRD is able to
capture frame right after it is generated by the compositor. But if
they are completely out of sync, then CRD can always see a stale
frame (delayed by one cycle and it can cause users to feel stutter).

Compositor Frame Ready | .+.. | | .+.. |
     CRD Frame Capture | +... | | +... |

This stutter can become worse if the compositor is delayed in
generating the frames for some reason (e.g. load on the system).

Bug: chromium:1291247
Change-Id: I7c10c724fbbd87dc523d474e7ece8e8aa146fd7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291080
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39218}
2023-01-28 03:37:46 +00:00