diff options
author | MaZderMind <github@mazdermind.de> | 2015-04-23 06:49:07 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-04-23 06:49:42 +0200 |
commit | f4cd6ec1bfed02def8502bc8373b1fe0d35acca8 (patch) | |
tree | 0b6f79472d0d033a8fb9c852f079d15740132731 /voctocore/experiments/startuptest/testbin.py | |
parent | 33ae6e1aac59b4d120ed3b8a319c6eb0ed5045cf (diff) |
remove unsuccessful experiments, add intervideo-based working example
Diffstat (limited to 'voctocore/experiments/startuptest/testbin.py')
-rw-r--r-- | voctocore/experiments/startuptest/testbin.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/voctocore/experiments/startuptest/testbin.py b/voctocore/experiments/startuptest/testbin.py deleted file mode 100644 index e234b55..0000000 --- a/voctocore/experiments/startuptest/testbin.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python3 -import time -from gi.repository import GLib, Gst - -class TestBin(Gst.Bin): - def __init__(self): - super().__init__() - self.set_name('testbin') - - # Create elements - self.shmsrc = Gst.ElementFactory.make('shmsrc', None) - - # Add elements to Bin - self.add(self.shmsrc) - - self.shmsrc.set_property('socket-path', '/tmp/grabber-v') - self.shmsrc.set_property('is-live', True) - self.shmsrc.set_property('do-timestamp', True) - - # Install pad probes - self.shmsrc.get_static_pad('src').add_probe(Gst.PadProbeType.BLOCK | Gst.PadProbeType.EVENT_DOWNSTREAM, self.event_probe, None) - self.shmsrc.get_static_pad('src').add_probe(Gst.PadProbeType.BLOCK | Gst.PadProbeType.BUFFER, self.data_probe, None) - - def do_handle_message(self, msg): - if msg.type == Gst.MessageType.ERROR: - print("do_handle_message(): dropping error") - return - - print("do_handle_message()", msg.src, msg.type) - Gst.Bin.do_handle_message(self, msg) - - def event_probe(self, pad, info, ud): - e = info.get_event() - if e.type == Gst.EventType.EOS: - return Gst.PadProbeReturn.DROP - - return Gst.PadProbeReturn.PASS - - def data_probe(self, pad, info, ud): - self.last_buffer_arrived = time.time() - return Gst.PadProbeReturn.PASS |