"GStreamer" (GNOME Bugzilla)
2016-01-10 18:00:41 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=760403
Bug ID: 760403
Summary: VideoFilter works with gst 1.5 but not 1.6
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-python
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---
#!/usr/bin/env python
from gi.repository import GObject, GstVideo, Gst, GstBase
GObject.threads_init()
Gst.init()
class TestFilter(GstVideo.VideoFilter):
""" A basic, buffer forwarding Gstreamer element """
#here we register our plugin details
__gstmetadata__ = (
"TeetFilter plugin",
"Generic",
"TestFilter is a filter",
"Test Author")
_srctemplate = Gst.PadTemplate.new('src',
Gst.PadDirection.SRC,
Gst.PadPresence.ALWAYS,
Gst.Caps.from_string("video/x-raw,format=I420"))
_sinktemplate = Gst.PadTemplate.new('sink',
Gst.PadDirection.SINK,
Gst.PadPresence.ALWAYS,
Gst.Caps.from_string("video/x-raw,format=I420"))
__gsttemplates__ = (_srctemplate, _sinktemplate)
def __init__(self):
GstVideo.VideoFilter.__init__(self)
self.set_passthrough(True)
def do_transform_frame_ip(self, inframe):
print("succes!!!")
return Gst.FlowReturn.OK
def do_set_info(self, incaps, in_info, outcaps, out_info):
return True
def plugin_init_testfilter(plugin):
t = GObject.type_register (TestFilter)
Gst.Element.register(plugin, "testfilter", 0, t)
return True
Gst.Plugin.register_static(Gst.VERSION_MAJOR, Gst.VERSION_MINOR, "testfilter",
"test filter plugin", plugin_init_testfilter, '1', 'LGPL', 'testfilter',
'testfilter', '')
#
# Simple Sink element created entirely in python
#
class TestVideoSink(GstBase.BaseSink):
__gstmetadata__ = ('TestVideoSink','Sink', \
'Custom test sink element', 'Edward Hervey')
__gsttemplates__ = Gst.PadTemplate.new("sink",
Gst.PadDirection.SINK,
Gst.PadPresence.ALWAYS,
Gst.Caps.new_any())
def do_render(self, buffer):
Gst.info("timestamp(buffer):%s" % (Gst.TIME_ARGS(buffer.pts)))
print("do_render")
return Gst.FlowReturn.OK
def plugin_init_testvideosink(plugin):
t = GObject.type_register(TestVideoSink)
Gst.Element.register(plugin, "testvideosink", 0, t)
return True
Gst.Element.register(None, "testvideosink", Gst.Rank.NONE, TestVideoSink)
if __name__ == '__main__':
filter = Gst.ElementFactory.make('testfilter')
sink = Gst.ElementFactory.make('testvideosink')
assert(filter)
assert(sink)
Bug ID: 760403
Summary: VideoFilter works with gst 1.5 but not 1.6
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-python
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---
#!/usr/bin/env python
from gi.repository import GObject, GstVideo, Gst, GstBase
GObject.threads_init()
Gst.init()
class TestFilter(GstVideo.VideoFilter):
""" A basic, buffer forwarding Gstreamer element """
#here we register our plugin details
__gstmetadata__ = (
"TeetFilter plugin",
"Generic",
"TestFilter is a filter",
"Test Author")
_srctemplate = Gst.PadTemplate.new('src',
Gst.PadDirection.SRC,
Gst.PadPresence.ALWAYS,
Gst.Caps.from_string("video/x-raw,format=I420"))
_sinktemplate = Gst.PadTemplate.new('sink',
Gst.PadDirection.SINK,
Gst.PadPresence.ALWAYS,
Gst.Caps.from_string("video/x-raw,format=I420"))
__gsttemplates__ = (_srctemplate, _sinktemplate)
def __init__(self):
GstVideo.VideoFilter.__init__(self)
self.set_passthrough(True)
def do_transform_frame_ip(self, inframe):
print("succes!!!")
return Gst.FlowReturn.OK
def do_set_info(self, incaps, in_info, outcaps, out_info):
return True
def plugin_init_testfilter(plugin):
t = GObject.type_register (TestFilter)
Gst.Element.register(plugin, "testfilter", 0, t)
return True
Gst.Plugin.register_static(Gst.VERSION_MAJOR, Gst.VERSION_MINOR, "testfilter",
"test filter plugin", plugin_init_testfilter, '1', 'LGPL', 'testfilter',
'testfilter', '')
#
# Simple Sink element created entirely in python
#
class TestVideoSink(GstBase.BaseSink):
__gstmetadata__ = ('TestVideoSink','Sink', \
'Custom test sink element', 'Edward Hervey')
__gsttemplates__ = Gst.PadTemplate.new("sink",
Gst.PadDirection.SINK,
Gst.PadPresence.ALWAYS,
Gst.Caps.new_any())
def do_render(self, buffer):
Gst.info("timestamp(buffer):%s" % (Gst.TIME_ARGS(buffer.pts)))
print("do_render")
return Gst.FlowReturn.OK
def plugin_init_testvideosink(plugin):
t = GObject.type_register(TestVideoSink)
Gst.Element.register(plugin, "testvideosink", 0, t)
return True
Gst.Element.register(None, "testvideosink", Gst.Rank.NONE, TestVideoSink)
if __name__ == '__main__':
filter = Gst.ElementFactory.make('testfilter')
sink = Gst.ElementFactory.make('testvideosink')
assert(filter)
assert(sink)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.