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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}