'Enable manual processing of messages from bus.
Should only be used by tests.'

def enable_sync_handler(self):

    def sync_handler(bus, message):
        self._handler.on_message(bus, message)
        return Gst.BusSyncReply.DROP
    bus = self._playbin.get_bus()
    bus.set_sync_handler(sync_handler)
