MCPcopy Create free account
hub / github.com/GStreamer/gst-python / __init__

Method __init__

old_examples/switch.py:21–33  ·  view source on GitHub ↗
(self, videowidget)

Source from the content-addressed store, hash-verified

19
20class SwitchTest:
21 def __init__(self, videowidget):
22 self.playing = False
23 pipestr = ('videotestsrc pattern=0 ! queue ! s.sink0'
24 ' videotestsrc pattern=1 ! queue ! s.sink1'
25 ' input-selector name=s ! autovideosink')
26 self.pipeline = gst.parse_launch(pipestr)
27 self.videowidget = videowidget
28
29 bus = self.pipeline.get_bus()
30 bus.enable_sync_message_emission()
31 bus.add_signal_watch()
32 bus.connect('sync-message::element', self.on_sync_message)
33 bus.connect('message', self.on_message)
34
35 def on_sync_message(self, bus, message):
36 if message.structure is None:

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected