diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 883abc3b..51cd8bc4 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -89,4 +89,12 @@ level 3, you can run:: GST_DEBUG=3 mopidy -v This will produce a lot of output, but given some GStreamer knowledge this is -very useful for debugging GStreamer pipeline issues. +very useful for debugging GStreamer pipeline issues. Additionally +:envvar:`GST_DEBUG_FILE=gstreamer.log` can be used to redirect the debug +logging to a file instead of standard out. + +Lastly :envvar:`GST_DEBUG_DUMP_DOT_DIR` can be used to get descriptions of the +current pipeline in dot format. Currently we trigger a dump of the pipeline on +every completed state change:: + + GST_DEBUG_DUMP_DOT_DIR=. mopidy diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 51b30f91..95ccb841 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals import logging +import os import gobject @@ -351,6 +352,10 @@ class _Handler(object): logger.debug('Audio event: stream_changed(uri=None)') AudioListener.send('stream_changed', uri=None) + if 'GST_DEBUG_DUMP_DOT_DIR' in os.environ: + gst.DEBUG_BIN_TO_DOT_FILE( + self._audio._playbin, gst.DEBUG_GRAPH_SHOW_ALL, 'mopidy') + def on_buffering(self, percent): gst_logger.debug('Got buffering message: percent=%d%%', percent)