[pygtk] gstreamer 0.10 to 1.0 and gtk2 to gtk3 errors

Niklas Koep niklas.koep at gmail.com
Fri Feb 1 00:33:01 PST 2013


I think a minimal program which reproduces the error would be helpful here.
What exact versions of gstreamer, pygobject (python2-gobject), etc. are you
using? In any case, calling Gst.ElementFactory.make with one argument from
an interactive session already raises a TypeError exception for me as the
method requires you to specify a unique name, as well as the element type.
I guess default arguments aren't supported by pygobject yet which means you
have to pass both 'xvimagesink' and None to the method for gstreamer to
create a name for the element by itself.

Also, do you call Gst.init() before making any other gstreamer calls? I was
under the impression this was called upon importing the module, but for
some reason the interpreter complains about it if you don't explicitly call
it. Weirdly enough according to the gstreamer-1.0 source g-ir-scanner is
called with --add-init-section="gst_init(NULL, NULL);".

Regards, Niklas



2013/1/31 laguillaumie sylvain <s.lagui at free.fr>

> hi list(s)
>
> i try to port my app to gtk3/gst1.0 but have some errors i dont understand
> i can post my code if needed but does someone have an idear on the
> followings errors...
>
> i post in pygtk and gst list but i have this crash since i used :
>
> self.player.videosink = Gst.ElementFactory.make('**xvimagesink')
>
>
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning: cannot
> register existing type `GstObject'
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning:
> g_once_init_leave: assertion `result != 0' failed
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning:
> g_type_register_static: assertion `parent_type > 0' failed
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning: interface
> type `GstImplementsInterface' or prerequisite type `<invalid>' invalid
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning: cannot add
> interface type `GstColorBalance' to type `GstPlayBin' which does not
> conform to prerequisite `GstImplementsInterface'
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning: cannot add
> interface type `GstColorBalance' to type `GstPlaySink' which does not
> conform to prerequisite `GstImplementsInterface'
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/types.py:47: Warning:
> /build/buildd/glib2.0-2.34.1/.**/gobject/gsignal.c:2459: signal
> `value-changed' is invalid for instance `0x9f680a8'
>   return info.invoke(*args, **kwargs)
> /usr/lib/python2.7/dist-**packages/gi/module.py:152: Warning: cannot
> register existing type `GstNavigation'
>   g_type = info.get_g_type()
> /usr/lib/python2.7/dist-**packages/gi/module.py:156: Warning:
> g_type_get_qdata: assertion `node != NULL' failed
>   type_ = g_type.pytype
> /usr/lib/python2.7/dist-**packages/gi/types.py:240: Warning: cannot
> register existing type `GstNavigation'
>   register_interface_info(cls.__**info__.get_g_type())
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 243, in mro
>     return mro(cls)
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 257, in mro
>     bases_of_subclasses += list(map(mro, C.__bases__)) +
> [list(C.__bases__)]
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 262, in mro
>     not_head = [s for s in bases_of_subclasses if candidate in s[1:]]
>   File "/usr/lib/python2.7/dist-**packages/gi/module.py", line 269, in
> __getattr__
>     return getattr(self._introspection_**module, name)
>   File "/usr/lib/python2.7/dist-**packages/gi/module.py", line 193, in
> __getattr__
>     wrapper = metaclass(name, bases, dict_)
>   File "/usr/lib/python2.7/dist-**packages/gi/types.py", line 240, in
> __init__
>     register_interface_info(cls.__**info__.get_g_type())
> TypeError: must be an interface
> **
> ERROR:/build/buildd/pygobject-**3.4.0/gi/_gobject/pygobject.c:**946:pygobject_new_full:
> assertion failed: (tp != NULL)
> Abandon (core dumped)
>
> thanks
>
> ______________________________**_________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/**listinfo/pygtk<http://www.daa.com.au/mailman/listinfo/pygtk>
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130201/c955ddd0/attachment-0001.html>


More information about the gstreamer-devel mailing list