From d42ebd1feceb3abcaa6b594e1923e9793da3994a Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Sat, 29 Mar 2014 15:22:34 +0100 Subject: [PATCH] Set buffer properties of gstreamer pipeline Manually set the `playbin2` buffer properties to their default values. The default values are not documented but hard-coded in gstreamer [1]. This is a starting point for making these properties configurable. For example we might want higher values on system with unsteady network connection. [1]: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/playback/gsturidecodebin.c?h=0.10#n1714 --- mopidy/audio/actor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 93b2769e..8dfe0fa8 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -100,6 +100,9 @@ class Audio(pykka.ThreadingActor): playbin = gst.element_factory_make('playbin2') playbin.set_property('flags', PLAYBIN_FLAGS) + playbin.set_property('buffer-size', 2*1024*1024) + playbin.set_property('buffer-duration', 2*gst.SECOND) + self._connect(playbin, 'about-to-finish', self._on_about_to_finish) self._connect(playbin, 'notify::source', self._on_new_source)