[gst-devel] X Errors when overlaying xvimagesink on GTK+ windows/widgets

Nick Daniels somebodys.home.is at gmail.com
Thu Dec 3 15:41:29 CET 2009


Hi,

> When running my test program I get the following situations with the
associated errors:
>
> 1. Window and video appears fine.
> ##############################
> ###
> Now playing

I have managed to solve the problem of the random crashes and X errors
preventing the program from working stably by using the "expose" method used
by Tristan in his blog and test program (
http://tristanswork.blogspot.com/2008/09/fullscreen-video-in-gstreamer-with-gtk.html).
I added the following line to my .ui file (attached in my original message)
in the GtkDrawingArea widget "object".

<signal name="expose-event" handler="window_expose_cb" />

And the following handler function to my "test.c" file, also attached in the
original message:

void window_expose_cb(GtkWidget * widget, GdkEventExpose * event, gpointer
data)
{
    gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(vidsink),
GDK_WINDOW_XWINDOW(widget->window));
}

Of course I then deleted the "setup_window" bus sync handler I was using
before.

> The "tristan-test" only overlays to the Gtk Window widget and works
> fine except it throws an X error on exit with the messages in the console
as follows:...

This is the only problem I still have and is the error Tristan's test
program has - when you close the window the following error appears:

The program 'test' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 205 error_code 3 request_code 3 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I assume this is because when the gst main loop is exited by closing the
window the video overlay isn't being shutdown properly? My final question:
is there a specific way you are meant to exit programs that are using X
overlays?

Many thanks,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091203/d8d41e81/attachment.htm>


More information about the gstreamer-devel mailing list