flatpak / libportal

libportal - Flatpak portal library
https://libportal.org
GNU Lesser General Public License v3.0
76 stars 38 forks source link

documentation refers to pw_remote_connect_fd from Pipewire 0.2 which no longer exists #154

Open Tooniis opened 1 month ago

Tooniis commented 1 month ago

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?

smcv commented 1 month ago

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.

grulja commented 1 month ago

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