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

Nick Daniels somebodys.home.is at gmail.com
Sun Nov 29 17:50:27 CET 2009


Hi there,

I've been struggling for the past couple of days trying to overlay video
from an xvimagesink onto GTK+ Window and DrawingArea widgets. I'm completely
new to GTK+, Glib and GStreamer (and C to some extent) which has made it
quite a steep learning curve!! I've trawled through documentation, websites
and the gst-devel archives and have almost done it...but I must be doing
something wrong as the result is very very buggy and intermittent, with
various different X Errors being displayed after exit, or causing the
program not to execute at all. I am using Ubuntu 9.10 with the latest
updates and relevant gstreamer packages installed from the Ubuntu archives.

I have attached a compressed archive with the source for the test program I
have written (in the "my-test" folder in the archive) which creates a simple
pipeline (videotestsrc -> xvimagesink) and tries to overlay the video onto a
DrawArea widget called "vid1". The GTK window is described in a .ui file and
I use the GtkBuilder function to build from this .ui file.

I have also attached the test program I have based it on (from
http://tristanswork.blogspot.com/2008/09/fullscreen-video-in-gstreamer-with-gtk.html)
in the "tristan-test" folder, with a modified makefile as the one supplied
wasn't working for me. 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:

####CONSOLE####
you hit f
you hit f
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 14983 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.)

####END CONSOLE####

When running my test program I get the following situations with the
associated errors:

1. Window and video appears fine.
#################################
Now playing
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 414 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.)

2. Window and video appears fine.
#################################
Now playing
The program 'test' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 456 error_code 9 request_code 133 minor_code 19)
  (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.)

3. Window appears fine (draws button and drawing area) but doesn't display
test video (drawing area is blank)
##########################################################################################################
Now playing
test: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

4. Nothing appears
##################
Now playing
test: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

5. Blank Window which then becomes unresponsive and has to be killed (-
there is a bit of a pause before the window loads aswell)
#########################################
Now playing
Killed

6. No window appears - program fails
#################################
Now playing
The program 'test' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this
connection)'.
  (Details: serial 264 error_code 14 request_code 53 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 the X errors when the program works fine is due to me not exiting
properly (as the console should print out "Returned, stopping playback" and
"Deleting Pipeline" before it exits). The other errors I assume are due to
me programming something wrong, but I just cannot find what!

Any help would be amazing and greatly appreciated!! When I have solved this
problem I also plan on writing a newbie guide on using video from GStreamer
with GTK+ as there seems to be a massive lack of any such guide!

Many thanks in advance,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091129/4448b6e8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nick-test-source.tar.gz
Type: application/x-gzip
Size: 3842 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091129/4448b6e8/attachment.bin>


More information about the gstreamer-devel mailing list