[gst-devel] gst-python and GstXOverlay

Johan Dahlin johan at fluendo.com
Tue Nov 9 03:43:00 CET 2004


> First, the general problem: I'm trying to write a Python application
> that creates a video playing pipeline (gst-python rocks!) and displays
> the video on a Gtk window (pygtk also rocks, by the way :-).

Cheers :-)

> I already managed to access the GstXOverlay interface in the xvimagesink
> element inside my pipeline, and can invoke the set_xwindow_id on it.
> However, as soon as I do that, the program dies with the following
> message:
> 
>   The program 'main.py' received an X Window System error.
>   This probably reflects a bug in the program.
>   The error was 'BadWindow (invalid Window parameter)'.
>     (Details: serial 32 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'm not exactly sure what needs to be done to make it work properly.

In my small video test application:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-
python/examples/gstplay/videoplayer.py?rev=1.3&view=auto

I'm using after realize + and idle to make it happen "a bit later",
which seems to work reliably on my machine, but it's a gross hack.


> As far as I can tell, XGetWindowAttributes only fails this way if it
> gets an XID that doesn't correspond to a window. I checked the XID
> directly before passing it to XGetWindowAttributes, and it actually
> corresponds to the window, as xwininfo shows.

I guess it's not completely "ready" at that point, it needs to be done a
little later.

Btw, are you planning to release your dvd player?

-- 
Johan Dahlin <johan at fluendo.com>
Fluendo S.L.





More information about the gstreamer-devel mailing list