gi.require_version('GstPlayer', '1.0')
from gi.repository import GstPlayer
-from gi.repository import GObject
-GObject.threads_init()
+from gi.repository import GLib
class Player(object):
self.player.connect("end-of-stream", self.end_of_stream_cb)
self.player.connect("state-changed", self.state_changed_cb)
- self.mainloop = GObject.MainLoop()
+ self.mainloop = GLib.MainLoop()
def end_of_stream_cb(self, player):
self.mainloop.quit()