Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TestFilter(GstVideo.VideoFilter):
- __gstmetadata__ = (
- "TestFilter plugin",
- "test_filter.py",
- "Description",
- "Contact"
- )
- _srctemplate = Gst.PadTemplate.new(
- 'src',
- Gst.PadDirection.SRC,
- Gst.PadPresence.ALWAYS,
- Gst.caps_from_string('video/x-raw, format=(string){ YV12, AYUV, YUY2, UYVY }')
- )
- _sinktemplate = Gst.PadTemplate.new(
- 'sink',
- Gst.PadDirection.SINK,
- Gst.PadPresence.ALWAYS,
- Gst.caps_from_string('video/x-raw, format=(string){ YV12, AYUV, YUY2, UYVY }')
- )
- __gsttemplates__ = (_sinktemplate, _srctemplate)
- def __init__(self):
- GstVideo.VideoFilter.__init__(self)
- self.set_passthrough(True)
- def do_transform_frame_ip(self, frame):
- print(frame.buffer.pts)
- return Gst.FlowReturn.OK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement