libportal icon indicating copy to clipboard operation
libportal copied to clipboard

documentation refers to pw_remote_connect_fd from Pipewire 0.2 which no longer exists

Open Tooniis opened this issue 1 year ago • 2 comments

Using pw_remote_connect_fd is suggested here: https://github.com/flatpak/libportal/blob/a1530a98db296a8f3c501932d68a7d008da2ac2e/libportal/remote.c#L877 However, this function no longer exists in PipeWire. How should screencast functionality be implemented instead?

Tooniis avatar Aug 07 '24 18:08 Tooniis

That documentation comment is outdated, pw_remote_connect_fd() seems to have been part of the Pipewire 0.2 API. Unfortunately I don't know the Pipewire 0.3/1.0 answer to your question.

I'd suggest looking for a working client of the screencast portal to use as a reference, or possibly looking for a project that previously used pw_remote_connect_fd() (for example qtwebengine-opensource-src, according to Debian code search) and finding out what it now does instead.

smcv avatar Aug 07 '24 19:08 smcv

You have to use pw_context_connect_fd. You can for example look at implementation in OBS Studio.

grulja avatar Aug 08 '24 06:08 grulja