cairooverlay: Generic Cairo overlay element for GStreamer

I wrote the initial version of this in late January, and after some interations it was merged yesterday to gst-plugins-good, and will be in gst-plugins-good 0.10.33. This solves the feature request I filed in 2009, one of my oldest bugreports in bugs.gnome.org!

What does it do?

cairooverlay allows you to draw arbitrary things on top of a video stream in GStreamer using Cairo. Previously you had to create a custom GStreamer element for that (in C/Vala), but now you can just hook up to some signals, using any programming language with GStreamer/Cairo bindings.

To draw an overlay using this element, you use the “caps-updated” signal to get information about the video stream (like width and height) and the “draw” signal to do the actual drawing. In addition to the Cairo context, the draw signal passes you the timestamp and duration of the buffer, so you can also do animations.

For more info see the included example application or the documentation (should be updated soon). Here is the obligatory screenshot showing the example application drawing a heart onto a test videostream:

GStreamer + Cairo = <3

The heart is actually animated, so I guess I should have had a video. But you’ll just have to trust me that it is very cute, or grab the code yourself!