[cairo] Cairo and Gstreamer Cairooverlay

Torsten Schoenfeld kaffeetisch at gmx.de
Thu Apr 26 11:13:10 PDT 2012


On 26.04.2012 15:42, Francesco Bruni wrote:
> def draw_overlay (self,cairooverlay,cr,timestamp,duration):
>          self.cr.set_source_rgb(0,0,0)
>          self.cr.set_line_width(10)
>          self.cr.move_to(10,15)
>          self.cr.line_to(20,20)
>          self.cr.stroke()

You need to do your drawing with the cairo context passed to 
draw_overlay, cr not self.cr.  Also, draw_overlay's argument list seems 
to be wrong; see 
<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-cairooverlay.html#GstCairoOverlay-draw> 
for the prototype.  At 
<http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/cairo/cairo_overlay.c> 
you'll find a working example.


More information about the cairo mailing list