rustdesk/libs
IronCodeStudios 377547fa11
scrap/wayland: insert videoconvert to fix screencast on COSMIC / DMA-BUF portals (#15063)
On Wayland compositors whose xdg-desktop-portal backend exposes screencast
frames as DMA-BUF buffers — notably xdg-desktop-portal-cosmic 0.1.0 on
Pop!_OS 24.04 / COSMIC — inbound screen capture fails. PipeWireRecorder
links pipewiresrc directly to an appsink whose caps only accept
video/x-raw BGRx/RGBx in system memory. That format set is too narrow for
the portal's buffer-type / modifier negotiation, which collapses with:

  pw.link: negotiating -> error no more output formats (-22)
  gstpipewiresrc: stream error: no more output formats
  gstbasesrc: streaming stopped, reason not-negotiated (-4)
  ERROR src/server/wayland.rs: Failed scrap Element failed to change its state

Inserting a videoconvert element between pipewiresrc and appsink widens
the negotiable format set to any system-memory video/x-raw format, giving
the portal room to settle on a format it can deliver via its SHM path.
videoconvert then converts to the BGRx/RGBx the appsink expects.

Verified on Pop!_OS 24.04 / COSMIC with gst-launch, before and after:

  # fails (current behaviour):
  gst-launch-1.0 pipewiresrc path=N ! video/x-raw,format=BGRx ! fakesink
  # works (with this change):
  gst-launch-1.0 pipewiresrc path=N ! videoconvert ! video/x-raw,format=BGRx ! fakesink

After the change, inbound connections capture and stream the desktop
normally and the "Failed scrap" error no longer occurs.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 16:02:23 +08:00
..
clipboard fix: V-002 security vulnerability (#14924) 2026-04-29 13:15:21 +08:00
enigo fix(linux): enable mouse side buttons in remote sessions (#14848) 2026-04-25 12:46:05 +08:00
hbb_common@c8cbb6be28 update hbb_common 2026-05-13 18:08:08 +08:00
libxdo-sys-stub fix(install): linux xdo (#14096) 2026-01-21 20:43:15 +08:00
portable bump to 1.4.6 2026-02-27 20:53:40 +08:00
remote_printer Allow non_snake_case identifiers in src/setup/mod.rs for libs/remote_printer. (#13384) 2025-11-02 21:19:13 +08:00
scrap scrap/wayland: insert videoconvert to fix screencast on COSMIC / DMA-BUF portals (#15063) 2026-05-17 16:02:23 +08:00
virtual_display impl(cm): implement change_theme and change_language callbacks (#14782) 2026-04-15 17:35:51 +08:00