[gst-devel] Gstreamer and Gtk

E. Westbrook gstreamer at westbrook.com
Tue Jun 30 09:50:16 CEST 2009


One of my experiments recently was using gtk to create the window that
xvimagesink would play into, rather than creating a window from hand with
XCreateSimpleWindow().  I got it working after learning how to get the X11
window ID out of a GtkWidget.

The GDK_WINDOW_XWINDOW(widget->window) convenience macro was what helped get
me unstuck on this one.

Just use that macro to retrieve the widget's X11 window ID, then pass it to
the gst_x_overlay_set_window_id() function when asked to by the
prepare-xwindow-id message from a given xvimagesink.

I could probably whip up a trivial demonstration case if that doesn't
explain well.  And please correct if I'm misunderstanding the question, as
always.

Hope that helps,
E. Westbrook

2009/6/29 João Paulo Mafra <jpmneofito at gmail.com>

> Hi,
>
> I'm trying to use the widget you talked about, but it seems that I need to
> have another x11 window to embed it in a GtkPlug, and then add the GtkPlug
> in a GtkSocket. Is it correct?
>
> I already can display gstreamer videos on a gtk window (as shown in this
> excelent post:
> http://tristanswork.blogspot.com/2008/09/fullscreen-video-in-gstreamer-with-gtk.html),
> but the problem now is to show it in the contents of a tab of the
> GtkNotebook widget. If I need another x11 window, can I normally display the
> video as I'm already doing, and then pass the window id to the GtkPlug?
>
>
> Thanks.
>
>
> 2009/6/24 Olivier Aubert <olivier.aubert at liris.cnrs.fr>
>
> > > I want to display videos on a limited area in a gtk widget (in a tab of
>> the
>> > > GtkNotebook widget). Anyone knows if is it possible?
>> Use a xvimagesink element and, using the XOverlay interface, embed it in
>> the tab through a GtkSocket (see
>> http://library.gnome.org/devel/gtk/stable/GtkSocket.html )
>>
>> Olivier
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090630/aa714cc2/attachment.htm>


More information about the gstreamer-devel mailing list