webrtc_m130/modules/desktop_capture
Jan Grulich 848980198e Video capture PipeWire: always capture latest processed buffer
Both CaptureFrame() and ProcessBuffer() hold a lock over the frame queue
and it happens that one waits for the other, causing unnecessary delays
since we already work with a queue having two frames, but this way we
don't really need a queue. Instead, keep reference to the last processed
buffer, which we will always use in CaptureFrame() and update it every
time at the end of ProcessBuffer(). This avoid unnecessary waiting for
the lock over the queue to be released.

Bug: chromium:333945842
Change-Id: I4afeb1daacd342e92578a50ac6e1c89a691bb8f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350042
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#42394}
2024-05-28 20:02:39 +00:00
..
2023-04-20 02:02:45 +00:00
2023-04-20 02:02:45 +00:00
2021-11-09 23:02:32 +00:00
2023-04-20 02:02:45 +00:00