Bug: webrtc:15719
Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41503}
rtc::TaskQueue is a wrapper of TaskQueueBase providing no extra functionality in this case
Bug: webrtc:14169
Change-Id: I5eb27a5dbb16f6097a9c71c2633c807808e50c05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333800
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41501}
Ensure top_active_prio_level_ is set to -1 in MaybeUpdateTopPrioLevel if
last packet is purged.
Bug: webrtc:15740
Change-Id: I81df9ee084de89f79b8ab79db8ce52fe1e20738a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333883
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41498}
This field trial was added 5 years ago in
https://webrtc-review.googlesource.com/c/src/+/111883
probably as a safe guard, but looks never used.
Bug: webrtc:11503
Change-Id: Ia9544b652b25fad4c614d66fe020f3d994c96505
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333380
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41490}
This is a reland of commit 63d03f586b
Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
> std::map<std::string, std:string>
> with three aliases,
> cricket::CodecParameterMap
> SdpAudioFormat::Parameters
> SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}
Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
Adds separate priorities for audio and video retranmission.
Done by adding an original type to RtpPacketToSend.
Add possiblity to set TTL for audio nack, video nack and video packet separately.
Oldest packet for these types are dropped when a new packet of that type is pushed to the pacer, or when the pacer switch current priority type to that priority.
Effect is that:
-pacer queue does not grow unlimited for these types if a TTL has been set.
-an old packet is not sent.
Bug: webrtc:15740
Change-Id: I38718bc570aebca54eacbded69824905f3694f41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331823
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41414}
Fix the unintended disabling of RTP retransmissions for cloned encoded
frames, caused by passing an infinite "expected_retransmission_time".
Instead use a constant 10ms for now. For frames encoded locally, this is
set from an estimate of the RTT, but we currently don't have access to
that here (TODO added to pipe it through)
If an integration is cloning and then sending frames it received, it's
almost certainly resending received media to other peers on a local
network, so 10ms is a fair upperbound.
Tested locally with Chrome on Mac, configuring packet drops & observing
on chrome://webrtc-internals that retransmission packets are now sent.
Bug: chromium:1512631
Change-Id: I2483415dc7e0079f8a7b66f6607f4907698514c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41405}
which come from the a=fmtp:<pt> lines in the SDP and were used as either
std::map<std::string, std:string>
with three aliases,
cricket::CodecParameterMap
SdpAudioFormat::Parameters
SdpVideoFormat::Parameters
Use webrtc::CodecParameterMap in all places.
BUG=None
Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
After https://webrtc-review.googlesource.com/c/src/+/329141, best candidate can still be less than acked rate if not_increase_if_inherent_loss_less_than_average_loss, or the selected candidate is 95% of current estimate. This cl/ is ensure the previous cl works as intended. And add unit test.
Bug: webrtc:12707
Change-Id: Ie5683ca8ea51f6d80c4c59cbf08c22e8b24c0cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329441
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41298}
Move logging of decode failure from VCMGenericDecoder to VideoReceiveStream2 where remote SSRC is always known. Log frame details such as size and resolution which help to identify this frame in bitstream dump.
Bug: b/309132190
Change-Id: Ibe50799e448ffdc19f9857cc1625cfde0d7aa7a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328821
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41276}
Move some logic from PacketBuffer to NetEqImpl.
Bug: webrtc:13322
Change-Id: I88b1e55c0cd69700730d9ed41be04fcf1effa03f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328861
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41270}
These flags were never experimented or launched.
Bug: webrtc:12707
Change-Id: Iefedeade52fdcf7f978894c4bf837261810f41bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329080
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41265}
PacingController per default use a burst interval of 40ms. The behaviour can still be overriden by using the method SetSendBurstInterval.
Bug: chromium:1354491
Change-Id: Ie3513109e88e9832dff47380c482ed6d943a2f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311102
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41254}
This means that RtpPacketHistory::PaddingMode::kRecentLargePacket is
used per default.
Bug: webrtc:15201, b/284281602
Change-Id: If8feb66105a9b1e13ae4cb28a44a74c8839b72e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41215}
There are two threads involved here, the thread that calls the API
functions and the pipwire main loop. Using one race checker for both is
wrong and triggers aborts.
Use a different race checker for all variables that are used by the
pipewire main loop or guarded against concurrent access with the
thread_loop_lock.
In one case, two RTC_CHECK_RUNS_SERIALIZED() checks are needed, so
enhance the macro to generate unique variable names.
Bug: webrtc:15181
Change-Id: Ib41514eb7aa98fe85d830461aa0c71e42ba821bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326781
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41198}
This ensure upper link capacity estimate upper limit an increase in
delay based estimate, but the delay based estimate is not decreased if
link capacity estimate decrease.
Bug: webrtc:10498, b/300868877
Change-Id: I87e76e2a869e6f721cc8fe9d422e0194371d4e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327801
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41196}
This is a reland of commit 496893e89e
Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> 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@{#41179}
Bug: webrtc:14852
Change-Id: Iccb9af8bf6a6c37704bc58b6e57238b55761b079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41194}
Add a StartShortCircuiting() callback to allow clients which have
configured Encoded Transforms when creating a PeerConnection to have
all frames skip the transform. This offers a zero cost path for streams
which don't need transforms.
This is preferable to uninstalling/not installing the transform to allow
implementing the behaviour in
https://w3c.github.io/webrtc-encoded-transform/#stream-creation -
giving web apps a chance to configure transforms within a short window
(before the next JS event loop run, so usually sub-millisecond) after stream creation, without any untransformed frames passing.
Usage in Chromium: crrev.com/c/5040731
Bug: chromium:1502781
Change-Id: I803477db1df51e80bdedf6c84d2d3695b088de83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41184}
This reverts commit 496893e89e.
Reason for revert: Breaks https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/16103/overview
Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> 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@{#41179}
Bug: webrtc:14852
Change-Id: Ifdce738058c3e3fc7c76886939add2813405cae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327722
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41183}
This enables testing different settings without updating code and rebuilding the test binary. Example of command:
video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
Bug: webrtc:14852
Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
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@{#41179}
The updated Flexfec RFC states that a kbit of "0" means this is the last block of the mask, whereas in the 03 draft, "0" meant there's another block.
Reversing the logic in the updated RFC parser to fix.
Bug: webrtc:15002
Change-Id: I40e4c950b09ddf2db9da6c01908737282161bf1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327580
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41174}
Make sure the notifier is reset when tearing down the camera portal and also when we already called it. Destruction of camera portal will be mostly invoked by an object holding it and serving as an implementation of the notifier interface and in such case we have to make sure it will
not get called at this moment.
Bug: webrtc:15407
Change-Id: If0c1fb1493d64d5e1f0228ed71813abbb9280083
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41167}
Moving the header file and definitions for PipeWireSession to the source
file allows DeviceInfoPipeWire to be reimplemented or used in wrappers
without the consumer needing to add PipeWire includes and definitions.
Bug: webrtc:15654
Change-Id: I895059d50bdf9e6ed152eca729c618261701457a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327381
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41163}
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.
* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.
* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.
Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.
Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41144}
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.
The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.
This CL does two different things to improve the situation:
1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.
2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.
Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.
Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.
Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.
[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability
(cherry picked from commit 4be5927dc7)
Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#41079}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326960
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/branch-heads/6099@{#1}
Cr-Branched-From: 507f1cc3270d0577f79882acbd78e63e66008f3d-refs/heads/main@{#41042}
- Stable delay mode: this results in a very large reduction in the amount of time stretching and fewer underruns.
- More closely align PLC and CNG logic.
- Stop playing comfort noise after a timeout when no packets are received.
Several tests needed to be updated to match the new behavior.
Note that I should also refactor GetDecision to be easier to test in the future (remove internal state).
Bug: webrtc:13322
Change-Id: I1724a74b3b583d05a4bb8feb4f9a8c4a8b2b7c5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326780
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41125}
std::is_pod is deprecated since C++20. Replace with std::trivial and
std::is_standard_layout. Avoids a lot of warnings.
Bug: chromium:957519
Change-Id: Idb4bde7401c14c0896a84c357ec668b9916f613e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325484
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41117}
It did not result in big quality improvements.
Bug: webrtc:12201
Change-Id: I9728469a388ee179d6069af8521bfc5571870bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325533
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41087}
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.
The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.
This CL does two different things to improve the situation:
1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.
2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.
Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.
Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.
Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.
[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability
Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41079}
To ensure padding, we increase 1 bit instead of 1kbps to avoid that 1kbps adds up over time.
Not have unit test for this, but did manual/hamrit tests many times.
Bug: webrtc:12707
Change-Id: I9b3160ab1808cb3a21ff0609446359a4ec3a4949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325520
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41056}
The change is under field trial use_in_start_phase.
Bug: webrtc:12707
Change-Id: I2ba8245c5d126b3c8a2e54b826853d98aad6e4f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325184
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41047}
Increasing BWE by 1kbps should be safe/no-op in practice, and it ensures that padding in kIncreasing state will be triggered.
Bug: webrtc:12707
Change-Id: I82493d07a80abd60c93d9cff74baf0a55e77f2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325286
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41046}
Removed thread safety: for a low level helper it adds overhead that users may not need. In particular RtpSenderVideo doesn't need it because calls to SendVideo are already synchronized.
Added a feature to force producing extension as requested by downstream.
Cleanup and document api:
Changed rtp_frequency type to int as it has no reason to use uint32_t per style guide
Changed absolute_capture_time to NtpTime to clarify both units and offset of the time. NtpTime has trivial conversion to/from uint64_t
Documented all the parameters.
Cleanup tests.
Bug: b/307553606
Change-Id: I0922ca4d3c89f124eeb561742dca79ed5c2327fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325022
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/main@{#41023}
If we have been sending padding for 1s and estimate still is unchanged, then stop padding by transitioning to decrease state.
Bug: webrtc:12707
Change-Id: I0dca2e5cd98263fc7fae9882c23c21634413c7a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324740
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41018}
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library
Additionally, this CL removes the rtc_json "poisonous" attribute: the scheme is incompatible and redundant with testonly.
Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2 main reasons:
1. Packet sizes are much different thus a lost audio packet should not be treated similar to a lost video packet. In low bandwidth/traffic policing scenario, the number of send packet is few, thus the computed loss can be imprecise.
2. Given a candidate bandwidth estimate, the objective function (how good the candidate is) is computed by recomputing loss rate = send rate/estimate bandwith + inherent loss. It means the objective function is byte based rather than packet based.
Potential risk: the current algorithm params are tuned based on packet count, thus it might not work with byte count, which is much higher than packet count.
The change is under field trial and disabled by default.
Bug: webrtc:12707
Change-Id: I8b832e7920d2b4cadcd4a072b3a4d4f26a213a20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325065
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41013}
Using RTC_DCHECK for test validation is wrong to begin with (gets
compiled out in non-debug builds, which measn we may miss validations),
but becomes extra problematic when we include code with side-effects
inside the DCHECK, which results in release-build tests having a
different flow than intended
Bug: webrtc:15572
Change-Id: I89d5b55f903b9d93fe4a929548d1b9fcde8941be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323182
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41005}
Bug: webrtc:1314868
Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40994}
Before this change bitrate limits for VP9 single spatial layer case were set in VideoCodecInitializer. Move this logic to GetVp9SvcConfig. This simplifies replication of WebRTC behaviour in codec level tests. The similar AV1 logic sits in SetAv1SvcConfig, not VideoCodecInitializer.
Bug: webrtc:14852
Change-Id: Ie7202ec880d0e4b903e7265721eeef9b3920f21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324286
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40992}
The initial hold duration is 300ms.
Whenever it enters kDecreasing state, it will double the current hold duration. The hold duration will be reset as soon as the delay based estimate works, e.g. the state is kDelayBased to avoid getting stuck at low bitrate.
Bug: webrtc:12707
Change-Id: I3906ff80b071ba3eb6274b012fb31922f4cbc7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324304
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40991}
Addes field trial UpperBoundCandidateInAlr to LossBasedBweV2. If an
instant upper bound exist in ALR that are lower than current estimate,
use it as a candidate.
Bug: webrtc:12707
Change-Id: I55595c7225c4289e1bc4edde9d9576e0443d3dce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324220
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40986}
UsePadding - signals to GoogCC that padding should be used to fill up to
BWE while BWE is ramping up.
Bug: webrtc:12707
Change-Id: I7b4922dff3a83da370c50c567050bfa748190b40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324160
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40979}
Ensure acked bitrate is not used for lower loss based estimate if
estimate improve.
Ensure LossBasedBweV2 is in state DelayBased if reached max rate.
Bug: webrtc:12707
Change-Id: I20230b99e0c2b530570e2f2de8ea88179f795c50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324140
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40977}
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly notifed after creation that network is not writable.
Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
Sometimes OpenH264 returns a key frame even though we have not
requested one. However, SVC controller does not know about this
and will not reset its state. Since we are comparing expected tid
from SVC controller with actual tid from OpenH264, and drop frames
if they do not match, that causes a missing frame.
This CL resets the SVC controller state on key frames, ensuring
that it accurately maintains its state and does not drop frames.
Also, changes the message of the error log to be more descriptive.
Now, it will print the expected tid and actual tid.
Bug: webrtc:14877
Change-Id: I6c9e7532b2478773f03e5707bf7a1ca56e4f7b99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40972}
Without this change a FrameDropped sample will be added to
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult at the
current capture rate as long as a captured window is minimized.
Bug: webrtc:1314868
Change-Id: I9b68675486642e7ca25674df689c207ac94a206e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323882
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40969}
The state should be computed from the actual estimate rather than the best estimate candidate. The fix is NOT under field trial.
And some other cleanup:
1. Loss based result will be computed in UpdateBandwidthEstimate method. Currently it is re-computed in GetLossBasedResult.
2. Rename current_estimate to current_best_estimate to avoid misunderstanding that current_estimate is the `final estimate`. The final estimate is computed by applying lower and upper bound on current_best_estimate
3. Remove current_state_. The state is stored directly in loss_based_result_.
Bug: webrtc:12707
Change-Id: Ie612845f907b9e6333fbd8249ddc9b93ad9f8042
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324022
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40964}
This will be used in an experiment to ramp up BWE when BWE is reduced
due to loss.
Bug: webrtc:12707
Change-Id: I3b78f9dd3fe8ef9f94a9616640ffb8b2225e161e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324042
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40961}
This cl/ makes sure that the estimate cannot go lower than a factor of acked bitrate. The current flag LowerBoundByAckedRateFactor is set to 0, means we dont use it.
Bug: webrtc:12707
Change-Id: I75d5881f0b85a374af3f7039b82c71aee97fb7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323881
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40958}
This ensure probe results can not be lower than 85% percentage of the
acked bitrate.
Bug: webrtc:11498
Change-Id: I501eeb84f7a049140c45c89e7de7e8080c13f94d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324040
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40957}
MinNumObservations is set to 3 per default as loss based BWE should not be ready if it has few feedbacks. We use a flag, rather than a const since we want to customize it for our unit tests, which often have 1-2 packet feedbacks only, and customize it later in prod if necessary.
Bug: webrtc:12707
Change-Id: Id1cd21aaf6137996de2e51cb5e33fc2a4bb07d8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40952}
By producing new message only when new max is 10% larger than the previous max.
Bug: b/305042040
Change-Id: Id85784939f944de8115b881471b02214c34b3043
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323841
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40950}
Cleanup field trials for not probing when BWE limited due to high RTT,
loss.
Bug: webrtc:14754, webrtc:12707
Change-Id: Ib664784e321d9284d842ea42a0dd1d8361000f20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323640
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40949}
If the tests are run in a different order, the test might fail.
We fix this by resetting the histogram data at the start of the test.
Change-Id: I6fb349609842b55f416cf2ec8cd93d0b4328960e
Bug: chromium:1430806
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323801
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Fredrik Hernqvist <fhernqvist@google.com>
Cr-Commit-Position: refs/heads/main@{#40946}
These features are not in use.
Bug: webrtc:12707
Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40938}
Replacing RTC_DCHECK code with EXPECT_TRUE in the remote ntp time estimator unittest code.
This to prevent test failures when building and testing in non-debug mode.
Bug: webrtc:15572
Change-Id: I372fcd6ee29a4ddc07d6b27ddd492dcea13d399f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323181
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40936}
Makes it more clear that a certain API is only supported in Windows 11.
Bug: webrtc:15451
Change-Id: Ic3abfb2cbf0e30f9cb722ac843876f41279bf200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323161
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40931}
The purpose is to ensure send socket buffers are not overfilled at high
pacing rates.
Bug: chromium:1354491
Change-Id: Ic6f473080292f84a2a099b85fb5817f7e14e7355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323000
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40911}
since the extension can be too large to fit the 16 bytes available
to one-byte extensions
https://www.rfc-editor.org/rfc/rfc8285#section-4.2
when including the width and height fields.
Also document when those fields are sent.
BUG=webrtc:12000
Change-Id: If17f57d40c0bde9b060f223c548e407d6c124b82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40910}
Convert most field trials used in PCLF tests.
Change-Id: I26c0c4b1164bb0870aae1a488942cde888cb459d
Bug: webrtc:10335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322703
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40909}
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.
Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
Do not automatically remove all tokens once we attempt to use them. This
mitigates an issue with Google Meet where an additional instance of a
DesktopCapturer is created and destroyed right away, taking away the
token we would use otherwise. Also save the token under same SourceId
once we get a new (but could be same) token from the restored session.
Bug: webrtc:15544
Change-Id: I565b22f5bf6a4d8a3b7d6d757f9c1046c7a0557d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322621
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40892}
ARM-specific settings were intended to be used on mobile ARM devices which may not be powerful enough. But the settings were also applied to ARM-based Macs. This changes restricts ARM-specific settings to Android and iOS platforms.
Bug: none
Change-Id: I68764b4c0679db07399bba5923f4a6be89c5ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321861
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40884}
This is a reland of commit 0d4b350006
Patchset 1 is the original CL. Patchset 2 contains a small tweak of the target bitrate in the unit test, in order to make in less susceptible to flakiness on runtime environments running a slightly different libvpx.
Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}
Bug: webrtc:15530
Change-Id: I096b7d952286f7f53852d1ca70aea398b2747784
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322540
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40874}
PacketBuffer is not designed to store wide range of the rtp sequence numbers
Bug: webrtc:15508
Change-Id: I62b19ba2896a667d795a41c38a60f55ee3f60566
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321845
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@google.com>
Cr-Commit-Position: refs/heads/main@{#40839}
Traditionally, we'd back off to 85% of the measured throughput in response to an overuse. However, this backoff doesn't appear to be sufficient to drain the queues in some low-bitrate scenarios, and the problem has gotten a bit worse with the RobustThroughputEstimator. (The new estimate looks more stable. The old estimator had more variation, the lowest points were lower, causing backoffs to lower rates.)
With this change, we back off to 0.85*thoughput-5kbps. The difference is negligible except at low bitrates.
Bug: webrtc:13402,b/298636540
Change-Id: I53328953c056b8ad77f6c7561d6017f171b2dfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321701
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40827}
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp
Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
NSApplicationActivateIgnoringOtherApps is about to be deprecated.
The default behavior is good enough.
Tested on Chrome using https://wicg.github.io/conditional-focus/demo/
Bug: webrtc:15511
Change-Id: I1f59aea3d4e7c4942d17ee5c4f1b6c2d398016ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321080
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40795}
A follow up cl/ is to remove passing upper link capacity from goog_cc to loss_based_bwe_v2.
Bug: webrtc:12707
Change-Id: I45af8ca6e8ba185700d0b7eb57004d2b61edeb9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40780}
This reverts commit 0f87b38535.
This is not needed with the macOS 14 SDK, which has the fix, and which
was landed in https://crrev.com/c/4875713.
Bug: chromium:1484363, chromium:1431897
Change-Id: I1e019ce71b90333d5d1333a3cf8bb510a3dbd212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320820
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40777}
When the specified device was not found in GetDevicesInfo,
SetPlayoutDevice/SetRecordingDevice will never return a (-1) error.
Bug: None
Change-Id: I9ac71cf72f7876c1c54ee593f184aa4007dba22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320500
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40768}
The purpose is to not allow an initial low link capacity estimate to reduce the current estimate.
Only delay overuse detection , low probe results or a loss event can
reduce the estimate.
Bug: webrtc:14392
Change-Id: Ib1618347f2c7681e3bd65d85ee687dec3cd67c97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320380
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40751}
The sequence number is generally not used for the estimation,
but may be used as a tie-breaker when ordering packet feedbacks.
Bug: b/299667054
Change-Id: I52a5145c889c8f6924838667cc267b1cd9565f7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320240
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40749}
In change https://webrtc-review.googlesource.com/c/src/+/319961, I changed a error. Also the same code will be added for video to enable Glass 2 Glass metric for Android. To me it make sense to add this method, and then change the audio code and video code to use it.
Bug: None
Change-Id: Id5d38c3bb8266213a93e67ceb82e88d65f29de53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#40745}
Update RtpPacketizerH264::PacketizeStapA to use
single_packet_reduction_len when all fragments end up in one H.264
packet.
Previous code was using first_packet_reduction_len +
last_packet_reduction_len for this case, which can cause an occasional
RTC_CHECK crash in RtpPacketizerH264::NextAggregatePacket due to
exceeding the available payload capacity of an RTP packet.
Bug: webrtc:15477
Change-Id: Iba1564a6a29618bef22f19d82aba938420994b23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319645
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@{#40737}
rtc::strcpyn second param should be the size of the destination buffer,
not the size of the source string. The result is that the final character
(usually a trailing directory path separator) is lost during the copy.
This has been masked because FormFileName helpfully adds a trailing path
separator if one is missing.
BUG=webrtc:15441
Change-Id: I992e69cad86a7e8bc2057ec629063f34c75fe75f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317502
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40736}
Only has an effect on Windows versions higher than 2104 (10.0.20348.0).
Bug: webrtc:15451
Change-Id: I3ca48c88a6c2b9b87d43805fcb2ade444cd90480
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318060
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40721}
This is a reland of commit a22c2a0c58
after systems depending on this have been fixed.
Original change's description:
> rtp sender: don't send BYE on deactivating streams
>
> as this breaks RTCP assumptions about SSRCs being no longer
> active as defined in
> https://www.rfc-editor.org/rfc/rfc3550#section-6.6
>
> This should not be sent in reaction to temporarily disabling
> a stream via RTCRtpParameters.active as this does not mean that
> the participant is leaving the session as defined in
> https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
> and does not indicate end of participation as defined in
> https://www.rfc-editor.org/rfc/rfc3550#section-6.1
> which stipulates BYE should be the last packet sent from this SSRC.
>
> BUG=webrtc:11082
>
> Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38059}
Bug: webrtc:11082
Change-Id: Iad8b503b3101d1e684a4da2d1547b879e77b85dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40716}
These two functions contain complicated logic that will be used as
a fallback in Chromium if the new macOS picker code does not work
as intended.
Bug: chromium:1478172
Change-Id: I5f2878c5a8da38d59aa42ec1358398e3c921b65c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319260
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40711}
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
Support the Pipewire videotransform meta via the already existing shared
infrastructure. This is needed for mobile devices which often have a 90
degree rotated camera - which is likely the reason there is already
support in the shared code paths.
Bug: webrtc:15464
Change-Id: I15223055d8675502ae326d270ebd2debbcfbfa50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318641
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@{#40708}
This can be helpful in various situations, such as debugging with an
unrestricted Pipewire socket or for downstream projects like
B2G/Capyloon. Additionally it will help once we move from the camera
portal to the more generic device portal.
Original patch by Fabrice Desré <fabrice@desre.org>
Bug: webrtc:15464
Change-Id: Iae6802f242d68244bca85947cb15ef3eee923ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318642
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40706}
BitrateTracker uses same implementation as RateStatistics, but provides api using Timestamp and DataRate types instead of plain numbers
Bug: webrtc:13756
Change-Id: Ie37fa58ede7590f870ec4376a64e7cf2c94431d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318841
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40697}
Combine all parameters into single struct so that it is easier to add and remove optional parameters
Use Timestamp type instad of plain int to represent capture time
Use rtc::ArrayView instead of pointer+size to represent payload
Merge passing audio level into send function.
Bug: webrtc:13757, webrtc:14870
Change-Id: I0386b710eb99b864334d61235add9abcde9bc69d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317442
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40688}
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.
Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
The build target that CreateFromCGImage() belongs to, desktop_capture_obj
is not visible externally. A utility header is created to make it accessible.
Bug: chromium:1471931
Change-Id: Ie40f39114d277dc4b62fe2ce95a6b0c7b61a3943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318123
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40659}
Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.
Bug: webrtc:13402 chromium:1411666
Change-Id: I38c309f74e8e1322602196354545b3a465866263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318040
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40653}
Start using RobustThoughputEstimator in DelayBasedBwe test in preparation for making it default.
Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.
Bug: webrtc:13402 chromium:1411666
Change-Id: I83cfa1fc15486982b18cc22fbd0752ff59c1c1b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317600
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40644}
Remove VCMEncodedFrame from the inheritance chain of EncodedFrames by
- moving getters for EncodedImage fields up to EncodedImage
- copying other non-deprecated fields & Methods from VCMEncodedFrame over to EncodedFrame
- Removing EncodedFrame's inheritance of VCMEncodedFrame
We leave VCMEncodedFrame as part of the (near) deprecated
VideoCodingModule code. The only place which needs to accept either is
in the generic decoder.
Bug: webrtc:9378, b:296992877
Change-Id: I60706aebbb6eacc7fd4b35ec90cc903efdbe14c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317160
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40639}
This is to ensure that a bad NetworkState estimate can not decrease BWE
unless an delay BW overuse has been detected.
Bug: webrtc:10489
Change-Id: Ic3a516345999eeba814200c2e295a19b347b2eb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317800
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@google.com>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40628}
Remove unused includes, including a TODO that is now irrelevant
Add missing includes
Remove definitinon for constexpr class constants as not needed since c++17 to avoid adding include for RTPExtensionType
Bug: webrtc:10198
Change-Id: I5f0ed15c5a9020d8b2e58bdfa213bb38eb59a840
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317443
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40611}
When GenericFrameDescriptor or DependencyDescriptor RTP extensions are used, we may receive multiple consecutive StapA packets where only the first packet has is_first_packet_in_frame set. The previous code assumed that all StapA had is_first_packet_in_frame = true. Per discussion on the attached bug, removing the DCHECK is OK.
Bug: webrtc:15155
Change-Id: I6348740eac7d70bca2b7541721aaa7e2b5e5a970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316941
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40608}
Expose new function MaybeCreateFrameDumpingEncoderWrapper that
wraps another passed encoder and dumps its encoded frames out
into a unique IVF file into the directory specified by the
"WebRTC-EncoderDataDumpDirectory" field trial. If the passed
encoder is nullptr, or the field trial is not setup, the function
just returns the passed encoder. The directory specified by the
field trial parameter should be delimited by ';'.
The new function is wired up in VideoStreamEncoder.
Bug: b/296242528
Change-Id: I6143adf899f78fcc03d4239a86c68dcbab483f1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317200
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40600}
Goal is to be able to get an improved overview of the distribution
of the total delay.
Bug: None
Change-Id: I0dced53eafd1fb09941590f3706480066c52419b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40597}
When built for chromium, some webrtc implementations are overridden and
are implemented by chrome's "//base". For instance webrtc::Location is
implemented by base::Location. So far so good, the affected targets are
correctly defined in GN to depend on base.
The problem: Most targets in webrtc do not declare correctly their
public_deps. When a public header of a target includes one from its
dependency, the dependency must be a public_deps. The public_deps
instruct GN to forward the capability to use code from the dependency
toward the dependent.
Unfortunately, it is not possible to fix the `public_deps` in webrtc,
because its is disallowed via a presubmit. See:
https://webrtc-review.googlesource.com/c/src/+/30262
WebRTC developers decided not to use `public_deps`, because GN config
are "translated" toward different kind of downstream build system who do
not really support the `public` dependencies concept. Instead WebRTC is
using some "common" configuration applied to all of its targets.
This patch add `rtc_common_public_deps` argument, to let embedders
add the dependencies WebRTC depends on.
Bug: chromium:1467773
Change-Id: I7de43372414a09886fcb07905451e6339c8ecc64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316660
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40595}
Remove code where integer -1 as delay is used to represent unset value.
Bug: webrtc:13756
Change-Id: I16a01e12c25a09ce21a971c9edabf47af5936662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316923
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40592}
Remove support for setting one limit without another limit
because related rtp header extension doesn't support such values.
Start morphing VideoPlayouDelay into a class and stricter type: add accessors returning TimeDelta
Bug: webrtc:13756
Change-Id: If0dd02620528dc870b015beeff3a8103e04022ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40570}
CreateFromCGImage() is needed to be called directly when we move away
from using the deprecated API that is used in CreateForWindow().
Bug: chromium:1471931
Change-Id: I28a2972a2a995103829fd9aff4bc1137a8b424b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315324
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40563}
after the downstream tests have been updated.
BUG=webrtc:14728
Change-Id: I9cf7eb607f8b26acf985d90625e55bac257a2606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316220
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40557}
This is a reland of commit 0e37f5ebd4
with backward compability added to allow downstream tests to migrate to the new signature.
Original change's description:
> Fix definition of keyframes decoded statistics
>
> which are defined to be measured after decoding, not before:
> https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded
>
> BUG=webrtc:14728
>
> Change-Id: I0a83dde278e1ebe8acf787bdac729af369a1ecf8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315520
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40545}
BUG=webrtc:14728
Change-Id: I4cf52bb22ba8244155b4fa8c367b9c0306a77590
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316120
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40553}
contributing sources are usually decided per packet, and thus having persistent member for csrcs makes them less natural to use.
Bug: None
Change-Id: I804d58ace574368f8cdd4356a15471110e530744
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291334
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40547}
Do not traverse the list of recovered media packets
if none of them was recovered through FEC recovery procedure.
Bug: None
Change-Id: Ib3aa59c946919fab08f0e20fcf279b1b8032d0e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315320
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Andrei Volykhin <andrey.volykhin@lge.com>
Cr-Commit-Position: refs/heads/main@{#40546}
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.
Reland of https://webrtc-review.googlesource.com/c/src/+/315143
Bug: None
Change-Id: I41ce383a2f19d489e4cae0b1bf1f720e0ffdd17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315460
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40538}
This reverts commit 762f193ca4.
Reason for revert: breaks downstream test
Original change's description:
> Cleanup calculating time between RTCP reports
>
> Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
> Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
> Use more strict types for the calculation to make it clearer.
> Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.
>
> Bug: None
> Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40529}
Bug: None
Change-Id: I8c83013523120a84f236e8efa0d122363e7a228b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315381
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40535}
CSRCs are decided on a per frame bases, thus keeping a constant copy of
csrcs inside the rtp sender transform delegate is confusing: when transform delegate is created, csrcs list is always empty.
Bug: None
Change-Id: Id94acc76857a47ad9a1dd8254648ab9cb5d6d31d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311840
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40533}
This change adds a new function to RTPFrameObject to allow setting the
RTPVideoHeader from VideoFrameMetadata.
The setMetadata function in TransformableVideoReceiverFrame disallows
changing anything other than frameID and dependencies.
Change-Id: I74e55ffbe1f426b660c2e243b20358c6a6cc2ffd
Bug: chromium:1464853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314963
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40530}
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.
Bug: None
Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40529}
and fix the follow-up mistake in the test
BUG=None
Change-Id: Id7a20769cc1d03dd8154564f948e8138ff8c4e74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40528}
by falling back to the primary encoding. This can happen with
opus stereo packets at the maximum bitrate which results in
1276 encoded bytes.
BUG=chromium:1470261
Change-Id: I3fd9bb30773963a519bbb5da44fe71db5dec2bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315141
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40524}
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.
Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
Store Detectos in a map by value instead of by unccessary pointer
Bug: None
Change-Id: Iab9904aafca02d9f9ae6633c87de860a5bd62ac7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313621
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40499}
This CL does 2 things:
- Change the DCHECK for payload_type_frequency to a CHECK (so that
this error will be a crash not a divide-by-zero)
- Change the replay helper that was used by the fuzzer to set the
frequency of the packets to the video value (90K).
Bug: chromium:1466826
Change-Id: I39941f250b1782b36a3bcddfd347a016591466ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312700
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40468}
Make sure the callback is reset when tearing down the PipeWireSession
and that there is no concurrent access to it, which can potentially lead
to a crash.
Bug: webrtc:15386
Change-Id: I0b09002fe0479dc1cd946c80684bcc5d8754d54a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311546
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40464}
This extension is documented to carry one bit: Screenshare.
It's been used for carrying simulcast layers and experiment IDs.
This CL removes that usage.
Bug: webrtc:15383
Change-Id: I048b283cde59bf1f607d8abdd53ced07a7add6f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312420
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40457}
This reverts commit 726992d7a4.
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 fe5be2eb4f.
>
> 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}
since it might have been deregistered previously.
BUG=chromium:1454860,chromium:1459124
(cherry picked from commit c0ed83eac2)
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-Original-Commit-Position: refs/heads/main@{#40431}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312120
Cr-Commit-Position: refs/branch-heads/5845@{#6}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
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}
This reverts commit fe5be2eb4f.
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}
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}
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}
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}
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.
(cherry picked from commit 9d677f4cdc)
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-Original-Commit-Position: refs/heads/main@{#40416}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311662
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#4}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
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}
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}
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}
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
(cherry picked from commit eee10391ca)
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-Original-Commit-Position: refs/heads/main@{#40335}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310500
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#2}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
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}
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}
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}
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}
This reverts commit 7534ebd2bf.
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}
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}
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}
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}
The logcat is spammed with warnings from timestamp aligner.
This CL make a workaround to use the timestamp aligner to get capture times,
without generating the warnings.
Bug: webrtc:14970
Change-Id: Idab4b298e0484a57841a214db9440f9ac6faaa4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296324
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#39486}
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}
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}
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}
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}
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}
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}