- def bus_message_cb(self, unused_bus, message):
- if message.type == Gst.MessageType.EOS:
- self.stop()
+ def on_eos(self, bus, message):
+ self.stop()
+
+ def on_error(self, bus, msg):
+ (err, debug) = msg.parse_error()
+ print("Error: %s" % err)
+ self.stop()