From 850b023758458593b2d7edc09904b5eb4551d622 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sat, 25 Jan 2014 14:47:23 +0100 Subject: [PATCH] audio: Add debug logging of stream switching --- mopidy/audio/actor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index ca023125..068981fc 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -115,6 +115,8 @@ class Audio(pykka.ThreadingActor): self._disconnect(source, 'enough-data') self._disconnect(source, 'seek-data') + logger.debug('Ready to switch to new stream') + def _on_new_source(self, element, pad): uri = element.get_property('uri') if not uri or not uri.startswith('appsrc://'): @@ -292,6 +294,9 @@ class Audio(pykka.ThreadingActor): logger.warning( '%s Debug message: %s', str(error).decode('utf-8'), debug.decode('utf-8') or 'None') + elif message.type == gst.MESSAGE_ELEMENT: + if message.structure.has_name('playbin2-stream-changed'): + logger.debug('Playback of new stream started') def _on_playbin_state_changed(self, old_state, new_state, pending_state): if new_state == gst.STATE_READY and pending_state == gst.STATE_NULL: