from gi.repository import Gst
Gst.init(None)
-from gi.repository import GObject
-GObject.threads_init()
+from gi.repository import GLib
PIPELINE_SRC = """
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)
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()