gstreamer Python and cairooverlay

RoyWiggins roywig at gmail.com
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:
> http://pastebin.com/y38Dnr3x):---[...]# 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/gst-cairo-test.py", 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

> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gstreamer-Python-and-cairooverlay-tp4655321p4657613.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121229/b6643285/attachment.html>


More information about the gstreamer-devel mailing list