multiple Gstreamer streams in one GTK window (Wayland)

Nicolas Dufresne nicolas at ndufresne.ca
Tue Jul 30 12:54:57 UTC 2019


Le mar. 30 juill. 2019 05 h 25, horai <ivo.hora at seznam.cz> a écrit :

> Dear all,
>
> I found  excellent post related to integrating Gstreamer sink into GTK on
> top of Wayland. I was learning from this DEMO:
>
> https://git.collabora.com/cgit/user/gkiagia/gst-wayland-gtk-demo.git/tree/?h=demo
>
> I would like to kindly ask  a help, I am about to test how it would perform
> with 4 GtkBox and each has encapsulated video.
> It works fine in X11, since I get unique ID for every GtkEventBox (ID:
> videoarea)
> d->window_handle3 = GDK_WINDOW_XID(window);
> But I am facing issues on top of Wayland backend probably related to this
> line:
> d->window_handle3 = (guintptr) gdk_wayland_window_get_wl_surface(window);
>
> Even thought the pointer represented by variable window is unique for each
> videoarea (ID: videoarea0, videoarea1, etc.), I am getting equally same
> pointer for GDK surface for each window (d->video_window0 =
> GTK_WIDGET(gtk_builder_get_object(builder, "videoarea0"));)
>
> I blame this for not resizing my GtkBoxes properly when resizing the main
> Window.There is also a note about GTK not supporting subsurfaces, but this


DEMO is 5 years old, so I hope there is


You'll find this demo upstream in gst-plugins-bad. Gtk/GDK does not
explicitly expose subsurface, but will use it for popover. In Wayland,
GStreamer creates it's own subsurface, as there is only one surface per
application, you have to pass the location relative to your app through
gst_video_overlay_set_render_rectangle().

a solution. I am utilizing
> waylandsink (it yields a warning with scalability at the start of my
> application).
>

This is fixed in gnome-shell 3.32, but came with other regression. Weston
works. Also, Weston has support for yuv which is still to be released in
gnome-shell, so don't expect ideal performance.

Would you mind giving me an advice how to workaround the issue with fixed
> GDK surface ID?
> Maybe the problem is somewhere else, but GDK_WINDOW_XID(window) gives
> unique
> ID to the same variable where
> gdk_wayland_window_get_wl_surface(window); gives the same to all rendering
> windows.
>
>
>
> Thank you very much
> Best regards,
> Ivo
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190730/0850d8b9/attachment.html>


More information about the gstreamer-devel mailing list