[Bug 686572] metadata is not set for inherited elements in python using pygi
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Dec 24 07:42:03 PST 2013
https://bugzilla.gnome.org/show_bug.cgi?id=686572
GStreamer | gst-python | 1.x
Thibault Saunier <thibault.saunier> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thibault.saunier at collabora.
| |com
--- Comment #6 from Thibault Saunier <thibault.saunier at collabora.com> 2013-12-24 15:41:58 UTC ---
__gstdetails__ does not exist anymore, it is now called __gstmetadata__.
Make sure that latest gst-python is present and properly set up.
The following code does work:
#!/usr/bin/python
from gi.repository import GObject, Gst
GObject.threads_init()
Gst.init(None)
class TestFilter(Gst.Bin):
__gstmetadata__ = (
'Test Filter',
'Generic',
'Passthrough for all buffers',
'jan'
)
__gsttemplates__ = (
Gst.PadTemplate.new('src', Gst.PadDirection.SRC,
Gst.PadPresence.ALWAYS, Gst.caps_from_string('ANY')),
Gst.PadTemplate.new('sink', Gst.PadDirection.SINK,
Gst.PadPresence.ALWAYS, Gst.caps_from_string('ANY'))
)
def __init__(self):
Gst.Bin.__init__(self)
def plugin_init(plugin, userarg):
TestFilterType = GObject.type_register(TestFilter)
res = Gst.Element.register(plugin, 'testfilter', 0, TestFilterType)
print('Registered?', res)
return True
version = Gst.version()
Gst.Plugin.register_static_full(
version[0],
version[1],
'testfilter',
'passthrough element',
plugin_init,
'1.0',
'LGPL',
'testfilter',
'testfilter',
'http://',
None
)
print(Gst.ElementFactory.find('testfilter').get_metadata('long-name'))
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list