class Player(object):
def __init__(self, pipeline):
self.pipeline = pipeline
+ bus = self.pipeline.get_bus()
+ bus.add_signal_watch()
+ bus.connect("message", self.bus_message_cb)
+
self.mainloop = GObject.MainLoop()
@staticmethod
self.quit()
def play(self):
- bus = self.pipeline.get_bus()
- bus.add_signal_watch()
- bus.connect("message", self.bus_message_cb)
-
self.pipeline.set_state(Gst.State.PLAYING)
try: