The latest GstreamerSDK and gst_x_overlay_set_window_handle (ubuntu)

Sebastian Dröge sebastian.droege at collabora.co.uk
Mon Oct 22 07:05:23 PDT 2012


On Mo, 2012-10-22 at 06:58 -0700, maveze wrote:
> Hi, i have a strange problem. I've used the SDK from: 
> http://docs.gstreamer.com/display/GstSDK/Tutorials
> <http://docs.gstreamer.com/display/GstSDK/Tutorials>  
> and *it runs well when installed on my system*.
> i tried to run the same code on a different system and i get:
> 
> (11111:21498): GStreamer-CRITICAL **: gst_implements_interface_cast:
> assertion `gst_element_implements_interface (GST_ELEMENT (from),
> iface_type)' failed
> 
> ** (11111:21498): CRITICAL **: gst_x_overlay_set_window_handle: assertion
> `overlay != NULL' failed
> 
> and a new window opens with the movie inside instead of showing in a  gtk
> drawing area(GtkWidget).
> 
> i have libgstreamer0.10-0-dev installed on the second system *BUT NOT THE
> SDK*.
> 
> i think that error came from realize callback:
> static void realize_cb (GtkWidget *widget, CustomData *data)
> {
>     data->window = gtk_widget_get_window (widget);
>     guintptr window_handle;
>     if (!gdk_window_ensure_native (data->window))
>         g_error ("Couldn't create native window needed for GstXOverlay!");
> 
>         /* Retrieve window handler from GDK */
> #if defined (GDK_WINDOWING_WIN32)
>     window_handle = (guintptr)GDK_WINDOW_HWND (data->window);
> #elif defined (GDK_WINDOWING_QUARTZ)
>     window_handle = gdk_quartz_window_get_nsview (data->window);
> #elif defined (GDK_WINDOWING_X11)
>     window_handle = GDK_WINDOW_XID (data->window);
> #endif
>     /* Pass it to playbin2, which implements XOverlay and will forward it to
> the video sink */
>     gst_x_overlay_set_window_handle (GST_X_OVERLAY (data->playbin2),
> window_handle);
> }
> 
> how can i make this work?

Hi,

the SDK version of GStreamer is based on 0.10.36 plus some changes from
GIT. In the GIT version it is possible to set the window handle directly
on the playbin2 instance, while in 0.10.36 and before this wasn't
possible.

Please read the documentation for GstXOverlay to understand how to set
the window handle in general:
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121022/4ed15864/attachment.pgp>


More information about the gstreamer-devel mailing list