[gnome-remote-desktop] rdp-pipewire-stream: Don't queue chosen PipeWire buffer
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] rdp-pipewire-stream: Don't queue chosen PipeWire buffer
- Date: Fri, 4 Mar 2022 07:29:15 +0000 (UTC)
commit 82880a1a0a7ed09cf3cc416c0578f0176004d169
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Fri Mar 4 07:36:00 2022 +0100
rdp-pipewire-stream: Don't queue chosen PipeWire buffer
When choosing the latest PipeWire buffer with a mouse pointer bitmap
and the latest PipeWire buffer with frame data, the same buffer can be
chosen for the mouse pointer bitmap and the frame data.
If there is in a further step another buffer with a mouse pointer
bitmap and it is chosen for the latest mouse pointer bitmap, then the
current PipeWire buffer won't be queued, because it is still chosen for
the latest frame data.
However, if the situation is the opposite, where first the same buffer
was chosen for the latest mouse pointer bitmap and the frame data, and
then the next buffer has no mouse pointer bitmap, but new frame
data, then the current buffer is queued again, although it is still
chosen for the latest mouse pointer bitmap.
Fix this situation by applying the same-buffer-logic in the mouse
pointer bitmap path to the frame data path as well.
src/grd-rdp-pipewire-stream.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/grd-rdp-pipewire-stream.c b/src/grd-rdp-pipewire-stream.c
index 51e77d4d..6e07b4cb 100644
--- a/src/grd-rdp-pipewire-stream.c
+++ b/src/grd-rdp-pipewire-stream.c
@@ -992,6 +992,9 @@ on_stream_process (void *user_data)
}
if (grd_pipewire_buffer_has_frame_data (next_buffer))
{
+ if (last_pointer_buffer == last_frame_buffer)
+ last_frame_buffer = NULL;
+
if (last_frame_buffer)
pw_stream_queue_buffer (stream->pipewire_stream, last_frame_buffer);
last_frame_buffer = next_buffer;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]