Re: Wayland screen capture



On Mon, 2018-04-30 at 17:18 +0200, Jonas Ådahl wrote:
On Mon, Apr 30, 2018 at 01:36:48PM +0100, David Woodhouse wrote:

I've just added screen sharing support to Pidgin, based on ximagesrc:

https://bitbucket.org/pidgin/main/pull-requests/330#Lpidgin/gtkrequest.cT1783

It's not wonderfully pretty, but it basically works, under X. I don't
like the fact that I ended up using XQueryPointer(), but I don't think
gdk_device_get_window_at_position() works for *foreign* windows, does
it?

More importantly, it's completely hosed for sharing either the full
desktop or individual windows which are Wayland clients. And I have no
real clue how to fix it. Suggestions please... :)


On Wayland, you should use the API provided by xdg-desktop-portal:
org.freedesktop.portal.ScreenCast. It is not directly related to X11
though, and should work the same no matter what windowing system you
use. Read more about it here:

https://wiki.gnome.org/Projects/Mutter/RemoteDesktop

Thanks for this and further help on IRC. I now have Pidgin screen
sharing (to Amazon Chime¹) working from raw X11, portal and maybe also
via gdiscreencapsrc on Windows.

That full patch is at
http://david.woodhou.se/pidgin-screenshare.patch

Or just the latest PipeWire bits, at
http://david.woodhou.se/pidgin-share-pipewire.patch

I need to tidy up some of the error handling and failure cases.

It would be really useful if there was a library somewhere, with a simple function to call for "prompt the 
user and then give me a GStreamer src element", which worked on all platforms.

That's essentially what I've provided in the Pidgin code. Except
someone more competent would ideally have written it.

Is there somewhere that functionality should live?

-- 
dwmw2

¹ https://github.com/awslabs/pidgin-chime

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]