gstreamer Python and cairooverlay

RoyWiggins roywig at
Sat Dec 29 00:36:49 PST 2012

Hi gstreamer folks,I'm having this exact problem and haven't found remedy
elsewhere. I can't say if it's a problem with the python gstreamer bindings,
or cairooverlay itself, or indeed both, but I thought you guys might be able
to give me a hand. I'm not averse to trying to fix the binding if it needs
fixing, but again I'm entirely new to delving into python C bindings. Any
help would be much appreciated.Thanks,Roy Wiggins
Łukasz Góralczyk wrote
> Hello,I'm trying to do some video overlay using gstreamer and
> cairooverlay,everything written in Python and I'm having some problemss.
> Here's asnippet from my code (everything:
>[...]# create cairooverlay and attach a
> functionself.cairooverlay =
> gst.element_factory_make("cairooverlay")self.cairooverlay.connect("draw",
> self.OnDraw)self.pipeline.add(self.cairooverlay)[...]# Callback function
> to do the drawing (inside class, also tried outside)def OnDraw(this,
> overlay, cr, timestamp, duration):  cr.show_text('Hello World') 
> cr.stroke() # commit to surface[...]---Error I get:---Traceback (most
> recent call last):  File "/some/dir/", line 71, in OnDraw   
> cr.show_text('Hello World')AttributeError: 'gobject.GBoxed' object has no
> attribute 'show_text'---The problem is that "cr" variable is passed as
> GBoxed object not a cairocontext. I suspect that GBoxed it might hold
> cairo context object but Idon't know how to extract it.How to extract
> cairo context from this GBoxed object? Or, more general, howto make
> everything
> work?Lukasz._______________________________________________gstreamer-devel
> mailing list

> gstreamer-devel at .freedesktop


View this message in context:
Sent from the GStreamer-devel mailing list archive at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list