Skip to content

RDP/VNC: Don't miss any PipeWire buffer data

This fixes an issue, where data in PipeWire buffers is missed. It was discussed on IRC some time ago.

The commit message is the same for both the RDP and VNC backend:

Currently, the PipeWire stream class instance determines the latest
frame- and mouse pointer- update by choosing the latest PipeWire buffer.
However, not every buffer contains mouse pointer data or frame data.
As a result of choosing the latest buffer, some data can be missed.

For example, the latest PipeWire buffer might contain mouse pointer
data, but no frame data.
The previous PipeWire buffer might contain here though frame data.
This frame data would then currently be missed.

Fix this situation by always checking each buffer on frame data and
mouse pointer data.
Save pointers to both the latest buffer with mouse pointer data and the
latest buffer with frame data.
If there is pointer data available, process the mouse pointer data,
queue the related PipeWire buffer again, if it is not the same buffer
as the one with the frame data and handle the frame data as before.
This ensures that gnome-remote-desktop never misses any data in
PipeWire buffers.

Depends on: !69 (merged) (commits included here)

Merge request reports