+ self._player.set_state(Gst.State.PLAYING)
+ self.loop = GObject.MainLoop()
+ self.loop.run()
+
+ def quit(self):
+ self._player.set_state(Gst.State.NULL)
+ self.loop.quit()
+
+ def on_eos(self, bus, msg):
+ self.quit()
+
+ def on_error(self, bus, msg):
+ (err, debug) = msg.parse_error()
+ print "Error: %s" % err, debug
+ self.quit()