Wayland gtk windowing (glimagesink)
Gregoire Gentil
gregoire at gentil.com
Mon Apr 29 04:15:23 UTC 2024
Thanks for helping. Still not working.
I have replaced glimagesink by waylandsink. If I don't call
"gst_video_overlay_set_window_handle", the video appears in the back. So
at least, waylandsink is working. But note that the video is appearing
without being part of any window at all.
If I call "gst_video_overlay_set_window_handle", the video doesn't
appear and doesn't play. I also receive the following message:
waylandsink cannot use an externally-supplied surface without an
externally-supplied display handle. Consider providing a display handle
from your application with GstContext
Am I missing another API call?
Grégoire
On 4/28/24 20:28, Max Weng wrote:
> I understand your situation better now. :) I've noticed that the video
> indeed appears in a separate window with other sinks as well. It seems
> that in my experience, only |waylandsink|consistently integrates
> directly into the GTK window without issues.
>
> On Mon, 29 Apr 2024 at 10:51, Gregoire Gentil <gregoire at gentil.com
> <mailto:gregoire at gentil.com>> wrote:
>
> I could have been more precise: the glimageslink pipeline does work and
> the video appears in a separated window if I don't link it to the
> window
> with the code mentioned below. What I want to do is to insert the video
> inside the gtk window.
>
> Also glimagesink has the unique advantage to work on both wayland and
> non-wayland systems,
>
> Grégoire
>
>
>
>
> On 4/28/24 19:12, Max Weng wrote:
> > try use waylandsink?
> >
> > this work for me "rtspsrc name=rtspsrc location={url} protocols=tcp
> > latency=10 max-rtcp-rtp-time-diff=10 ! errorignore ! rtph265depay
> > name=depay ! h265parse ! avdec_h265 name=avdec ! videoconvert !
> > video/x-raw, format=RGBA ! waylandsink name=sink"
> >
> > On Mon, 29 Apr 2024 at 06:18, Gregoire Gentil via gstreamer-devel
> > <gstreamer-devel at lists.freedesktop.org
> <mailto:gstreamer-devel at lists.freedesktop.org>
> > <mailto:gstreamer-devel at lists.freedesktop.org
> <mailto:gstreamer-devel at lists.freedesktop.org>>> wrote:
> >
> > Hello,
> >
> > I had an application with a gtk+-3.0 window and a pipeline "... !
> > imagesink". The video is rendered inside the gtk window.
> >
> > I was doing:
> > static void realize_cb(GtkWidget *widget, CustomData *data) {
> > GdkWindow *window = gtk_widget_get_window(widget);
> > data->window_handle = GDK_WINDOW_XID(window);
> >
> > and then:
> >
> > static GstBusSyncReply bus_sync_handler(GstBus * bus,
> GstMessage *
> > message, CustomData *data) {
> >
> gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(data->video_sink),
> > data->window_handle);
> >
> > Everything was working fine. I want now to support wayland
> system.
> >
> > Pipeline becomes: "... ! glimagesink".
> >
> > in the realize_cb function, I have now:
> > GdkWindow *window = gtk_widget_get_window(widget);
> > data->window_handle =
> > (guintptr)gdk_wayland_window_get_wl_surface(window);
> >
> >
> > At run-time, I'm getting hundreds of:
> > "GStreamer-GL-CRITICAL **: 14:06:48.263: Failed to flush Wayland
> > connection"
> >
> > What am I doing wrong? Many thanks in advance for any hint,
> >
> > Grégoire
> >
>
More information about the gstreamer-devel
mailing list