GstVideoOverlay, Gtk3 and Wayland

Jan Alexander Steffens jan.steffens at gmail.com
Fri Aug 12 15:02:41 UTC 2016


On Fri, Aug 12, 2016 at 4:24 PM Emmanuel Pacaud <
emmanuel.pacaud at lapp.in2p3.fr> wrote:

> When this application runs in a X11 session, everything works fine,
> like on the attached screenshot. But in a wayland session, the video is
> displayed in a separate window, instead of being embedded in the main
> application window.
>
> My code is based on what is in the GstOverlayElement documentation, in
> the GstVideOverlay and Gtk+ paragraph, which obviously doesn't handle
> the wayland case. How are we supposed to proceed in this case ?
>

You're using GDK_WINDOW_XID to get the X window ID to pass to
GstVideoOverlay. On Wayland, this won't work and should have caused
CRITICAL warnings to stderr, since you have a GdkWaylandWindow and not a
GdkX11Window.

waylandsink expects to get a pointer to a struct wl_surface instead of an X
window ID. You can obtain this pointer using
gdk_wayland_window_get_wl_surface.

You can test which kind of window you have using GDK_IS_X11_WINDOW and
GDK_IS_WAYLAND_WINDOW.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160812/47d0132c/attachment.html>


More information about the gstreamer-devel mailing list