[gst-devel] video sink to update OpenGL texture?

Martin Luessi mluessi at gmail.com
Sat Mar 21 20:43:32 CET 2009


> Clutter and the gst-plugins-gl module are other options you might
> explore. For the rawest output, where you're doing all the other GL
> operations yourself, you probably want the gst-plugins-gl stuff, but
> you'll have to get it from git - there's been no release tarballs yet.
>
> Cheers,
> Jan.
> --


Thanks Jan, I installed gst-plugins-gl from git and did some first
experiments. This seems to be what I'm looking for. Is it correct that
I would use 'glimagesink' and do the drawing using the
client-draw-callback? I'm not experienced with OpenGL, is it safe to
just redraw the part of the scene that shows the video in the
callback? I'm wondering as this callback function is called by a
gstreamer thread and if the application is doing other OpenGL stuff or
contains more than one video display, multiple threads are doing
OpenGL drawing operations simultaneously. If this does not work I
guess I will need to synchronize the draw callbacks of the glimagesink
with the main draw function of the application.

Another question, I'm using glimagesink from Python and try to connect
the callback like this:

self.videosink = gst.element_factory_make('glimagesink', 'videosink')
self.videosink.set_property('client-draw-callback', self.draw_callback)

But I get an error:
TypeError: could not convert argument to correct param type

Can anyone tell me the correct way of setting the callback in Python?
I also tried

self.videosink.connect('client-draw-callback', self.draw_callback)

But this doesn't work either (error:  unknown signal name: client-draw-callback)

Thanks,

Martin




More information about the gstreamer-devel mailing list