[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: Wayland gtk windowing (glimagesink)
From:       Nicolas Dufresne via gstreamer-devel <gstreamer-devel () lists ! freedesktop ! org>
Date:       2024-04-30 14:25:00
Message-ID: b9efdb6228f1b067d4e928cf5f27c8d1178d9cf0.camel () ndufresne ! ca
[Download RAW message or body]

Le lundi 29 avril 2024 à 10:12 +0800, Max Weng via gstreamer-devel a écrit  :
> 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"

gtkwaylandsink will give you a widget to place into your GTK3 app.

Nicolas

> 
> On Mon, 29 Apr 2024 at 06:18, Gregoire Gentil via gstreamer-devel
> <gstreamer-devel@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
> > 


[Attachment #3 (text/html)]

<html><head><style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head><body><div>Le lundi 29 avril 2024 Ã  10:12 +0800, Max Weng via \
gstreamer-devel a écrit&nbsp;:</div><blockquote type="cite" style="margin:0 0 0 \
.8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">try \
use&nbsp;waylandsink?&nbsp;<br><br><div>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"</div></div></blockquote><div><br></div><div>gtkwaylandsink will give you a \
widget to place into your GTK3 \
app.</div><div><br></div><div>Nicolas</div><div><br></div><blockquote type="cite" \
style="margin:0 0 0 .8ex; border-left:2px #729fcf \
solid;padding-left:1ex"><div><br></div><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Mon, 29 Apr 2024 at 06:18, Gregoire Gentil via gstreamer-devel \
&lt;<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>&gt; \
wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px \
#729fcf solid;padding-left:1ex"><div>Hello,<br></div><div><br>I had an application \
with a gtk+-3.0 window and a pipeline "... ! <br>imagesink". The video is rendered \
inside the gtk window.<br></div><div><br>I was doing:<br>static void \
realize_cb(GtkWidget *widget, CustomData *data) {<br>GdkWindow *window = \
gtk_widget_get_window(widget);<br>data-&gt;window_handle = \
GDK_WINDOW_XID(window);<br></div><div><br>and then:<br></div><div><br>static \
GstBusSyncReply bus_sync_handler(GstBus * bus, GstMessage * <br>message, CustomData \
*data) {<br>gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(data-&gt;video_sink), \
<br>data-&gt;window_handle);<br></div><div><br>Everything was working fine. I want \
now to support wayland system.<br></div><div><br>Pipeline becomes: "... ! \
glimagesink".<br></div><div><br>in the realize_cb function, I have now:<br>GdkWindow \
*window = gtk_widget_get_window(widget);<br>data-&gt;window_handle = \
(guintptr)gdk_wayland_window_get_wl_surface(window);<br></div><div><br></div><div><br>At \
run-time, I'm getting hundreds of:<br>"GStreamer-GL-CRITICAL **: 14:06:48.263: Failed \
to flush Wayland connection"<br></div><div><br>What am I doing wrong? Many thanks in \
advance for any hint,<br></div><div><br>Grégoire<br></div><div><br></div></blockquote></div></blockquote><div><br></div><div><span></span></div></body></html>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic