Re: [pygtk] gstreamer 0.10 to 1.0 and gtk2 to gtk3 errors
It appears I completely misunderstood the --add-init-section option of g-ir-scanner. It's only relevant for the creation of the introspection data. It's not a code section which gets called whenever the respective gobject language bindings (in your case pygobject) load a typelib. So in any case you have to call Gst.init() which you may or may not be doing anyway. 2013/2/1 Niklas Koep niklas.k...@gmail.com 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.la...@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,
Re: [pygtk] gstreamer 0.10 to 1.0 and gtk2 to gtk3 errors
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.la...@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@daa.com.au