Offscreen rendering and SDL

Andrey Nechypurenko andreynech at googlemail.com
Tue Aug 21 04:59:22 PDT 2012


Hi,

> application (actually, it's a pygame application, but I'm writing a
> module in C, so I can use the standard API for this). Using code
> snippets I found online, I've managed to create a window using X11 and
> can send the video there, but this approach makes it impossible to
> draw graphics over the video.

One possible way would be to create the OpenGL texture with decoded
frame. Than you can do whatever you want to compose the video with
your own graphics. For example, you can map the texture on the plane
in background and make your own drawing in front of this plane (in
foreground).

There are at least two ways to get decoded video frame as a texture.
The first one one is to use elements from gst-plugins-gl [1]. You can
take a look at corresponding examples [2] (there is also SDL example
over there). The second one is to use fakesink element with it's
hand-off mechanism to get raw decoded frame.

Yet another options might be cairo or gdkpixbuf plugins but I have no
experience with them.

[1] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-gl-plugins/html/
[2] http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/tree/tests/examples


More information about the gstreamer-devel mailing list