X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/87e464c0b3660c7dcf381c52a9b7449911219290..HEAD:/python/gst-decoupled-pipelines.py diff --git a/python/gst-decoupled-pipelines.py b/python/gst-decoupled-pipelines.py index 25a95b7..50ff31c 100755 --- a/python/gst-decoupled-pipelines.py +++ b/python/gst-decoupled-pipelines.py @@ -9,8 +9,7 @@ gi.require_version('Gst', '1.0') from gi.repository import Gst Gst.init(None) -from gi.repository import GObject -GObject.threads_init() +from gi.repository import GLib PIPELINE_SRC = """ @@ -28,7 +27,7 @@ intervideosrc timeout=-1 ! videoconvert ! rotate name=rotate ! videoconvert ! au class Player: def __init__(self): - self.loop = GObject.MainLoop() + self.loop = GLib.MainLoop() self.pipeline_src = Gst.parse_launch(PIPELINE_SRC) self.pipeline_sink = Gst.parse_launch(PIPELINE_SINK) @@ -94,8 +93,8 @@ def main(): player.on_rotate() return True - GObject.io_add_watch(sys.stdin, GObject.IO_IN, stdin_cb) - GObject.timeout_add(100, timeout_cb) + GLib.io_add_watch(sys.stdin, GLib.IO_IN, stdin_cb) + GLib.timeout_add(100, timeout_cb) print("\nPress Enter to freeze the video\n") player.run()