[gst-devel] using xoverlay

Tim Müller t.i.m at zen.co.uk
Sat Dec 15 18:28:48 CET 2007

On Sat, 2007-12-15 at 19:55 +0530, Vinod Nanjaiah wrote:

> Has anyone successfully used Xoverlay ;-)

Of course, a lot of GStreamer-based video players use it (e.g.

> I just can't seem to get the bus message "GST_MESSAGE_ELEMENT" so that I can
> proceed and call gst_x_overlay_set_xwindow_id ().
> If however, I don't check for the message and directly call
> gst_x_overlay_set_xwindow_id (), my app just seg faults with the following
> errors.
> GLIB WARNING ** GLib-GObject - invalid cast from `GstDSPMPEG4Sink' to
> `GstXOverlay'
> GLIB CRITICAL ** GStreamer - gst_implements_interface_cast: assertion
> `gst_element_implements_interface (GST_ELEMENT (from), iface_type)' failed
> Can someone please, please enlighten me on this.

GstXOverlay is an interface, which needs to be implemented by the video
sink. Also, it's usually wrapped by GstImplementsInterface which means
that it may only be available if the video sink is in a certain state
(such as >= READY).  So my guess would be that you are either using a
video sink which doesn't implement this particular interface or the
video sink is still in the NULL state (or the element is buggy).
'gst-inspect-0.10 dspmpeg4sink' should tell you what interfaces the
element implements, if any.


More information about the gstreamer-devel mailing list