Hi,
I'm developing a video viewer application for the aravis project (https://github.com/AravisProject/aravis) which uses a GstVideoOverlay element. 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 ? Cheers, Emmanuel. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel aravis.png (539K) Download Attachment |
On Fri, Aug 12, 2016 at 4:24 PM Emmanuel Pacaud <[hidden email]> wrote: When this application runs in a X11 session, everything works fine, 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. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, On Fri, 2016-08-12 at 15:02 +0000, Jan Alexander Steffens wrote:
The other portable way is to use gtkglsink which has a property that gives you a widget. Or you can use gtksink if you want non-accelerated rendering (which will be a lot more CPU intensive). This should work on both X and Wayland clients. --Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
Le sam. 20 août 2016 à 0:51, Olivier Crête <[hidden email]> a écrit : > On Fri, 2016-08-12 at 15:02 +0000, Jan Alexander Steffens wrote: >> On Fri, Aug 12, 2016 at 4:24 PM Emmanuel Pacaud >> <[hidden email]> 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 ? > > The other portable way is to use gtkglsink which has a property that > gives you a widget. Or you can use gtksink if you want > non-accelerated rendering (which will be a lot more CPU intensive). > This should work on both X and Wayland clients. Thanks Olivier. I have ported my viewer to use gtk(gl)sink and it works perfectly now. I had a position issue when the gtksink widget was added to a GtkStack with interpolate-size property set to TRUE. Setting it to FALSE solved my issue. More details here: https://bugzilla.gnome.org/show_bug.cgi?id=771427 Cheers, Emmanuel. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |