From eee3edf7273bb660be70be1fe9b055111be80c33 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sat, 1 Sep 2012 15:21:13 +0200 Subject: [PATCH] Turn autoaudiomixer into a bin. This allows us to add our sub mixer that we are proxing (not sure if GstChildProxy can be used in Python) so that state changes to the parent propagates nicely. --- mopidy/gstreamer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mopidy/gstreamer.py b/mopidy/gstreamer.py index 3c5f4ed3..de63b702 100644 --- a/mopidy/gstreamer.py +++ b/mopidy/gstreamer.py @@ -23,16 +23,16 @@ class GStreamerError(Exception): # elements. # TODO: use gst.Bin so we can add the real mixer and have state sync # automatically. -class AutoAudioMixer(gst.Element, gst.ImplementsInterface, gst.interfaces.Mixer): +class AutoAudioMixer(gst.Bin, gst.ImplementsInterface, gst.interfaces.Mixer): __gstdetails__ = ('AutoAudioMixer', 'Mixer', 'Element automatically selects a mixer.', 'Thomas Adamcik') def __init__(self): - gst.Element.__init__(self) + gst.Bin.__init__(self) self._mixer = self._find_mixer() - self._mixer.set_state(gst.STATE_READY) + self.add(self._mixer) logger.debug('AutoAudioMixer chose: %s', self._mixer.get_name()) def _find_mixer(self):