X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/d34a68551efa6fc231dd767ba3ef6bd005c5a5ce..17633e7e08f89ab87cc929f5e5b2449fe9d98756:/python/gst-input-selector-switch.py diff --git a/python/gst-input-selector-switch.py b/python/gst-input-selector-switch.py index f653dfa..31b93d0 100755 --- a/python/gst-input-selector-switch.py +++ b/python/gst-input-selector-switch.py @@ -43,7 +43,7 @@ class Player: self.pipeline.set_state(Gst.State.NULL) self.loop.quit() - def switch(self): + def on_switch(self): active_pad = self.selector.get_property("active-pad") if active_pad.get_name() == "sink_0": new_pad = self.selector.get_static_pad("sink_1") @@ -76,7 +76,7 @@ def main(): def stdin_cb(source, condition): source.readline() - player.switch() + player.on_switch() return True GObject.io_add_watch(sys.stdin, GObject.IO_IN, stdin_cb)