diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 3595092e..7dd5971e 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -135,7 +135,7 @@ class _Outputs(Gst.Bin): def __init__(self): Gst.Bin.__init__(self, 'outputs') - self._tee = Gst.element_factory_make('tee') + self._tee = Gst.ElementFactory.make('tee') self.add(self._tee) ghost_pad = Gst.GhostPad('sink', self._tee.get_pad('sink')) @@ -143,7 +143,7 @@ class _Outputs(Gst.Bin): # Add an always connected fakesink which respects the clock so the tee # doesn't fail even if we don't have any outputs. - fakesink = Gst.element_factory_make('fakesink') + fakesink = Gst.ElementFactory.make('fakesink') fakesink.set_property('sync', True) self._add(fakesink) @@ -161,7 +161,7 @@ class _Outputs(Gst.Bin): logger.info('Audio output set to "%s"', description) def _add(self, element): - queue = Gst.element_factory_make('queue') + queue = Gst.ElementFactory.make('queue') self.add(element) self.add(queue) queue.link(element) @@ -426,7 +426,7 @@ class Audio(pykka.ThreadingActor): jacksink.set_rank(Gst.RANK_SECONDARY) def _setup_playbin(self): - playbin = Gst.element_factory_make('playbin2') + playbin = Gst.ElementFactory.make('playbin2') playbin.set_property('flags', 2) # GST_PLAY_FLAG_AUDIO # TODO: turn into config values... @@ -451,7 +451,7 @@ class Audio(pykka.ThreadingActor): # We don't want to use outputs for regular testing, so just install # an unsynced fakesink when someone asks for a 'testoutput'. if self._config['audio']['output'] == 'testoutput': - self._outputs = Gst.element_factory_make('fakesink') + self._outputs = Gst.ElementFactory.make('fakesink') else: self._outputs = _Outputs() try: @@ -468,7 +468,7 @@ class Audio(pykka.ThreadingActor): # the actual switch, i.e. about to switch can block for longer thanks # to this queue. # TODO: make the min-max values a setting? - queue = Gst.element_factory_make('queue') + queue = Gst.ElementFactory.make('queue') queue.set_property('max-size-buffers', 0) queue.set_property('max-size-bytes', 0) queue.set_property('max-size-time', 3 * Gst.SECOND) @@ -478,7 +478,7 @@ class Audio(pykka.ThreadingActor): audio_sink.add(self._outputs) if self.mixer: - volume = Gst.element_factory_make('volume') + volume = Gst.ElementFactory.make('volume') audio_sink.add(volume) queue.link(volume) volume.link(self._outputs) diff --git a/mopidy/audio/scan.py b/mopidy/audio/scan.py index 573d2fab..3263f035 100644 --- a/mopidy/audio/scan.py +++ b/mopidy/audio/scan.py @@ -71,10 +71,10 @@ def _setup_pipeline(uri, proxy_config=None): if not src: raise exceptions.ScannerError('GStreamer can not open: %s' % uri) - typefind = Gst.element_factory_make('typefind') - decodebin = Gst.element_factory_make('decodebin2') + typefind = Gst.ElementFactory.make('typefind') + decodebin = Gst.ElementFactory.make('decodebin2') - pipeline = Gst.element_factory_make('pipeline') + pipeline = Gst.ElementFactory.make('pipeline') for e in (src, typefind, decodebin): pipeline.add(e) Gst.element_link_many(src, typefind, decodebin) @@ -96,7 +96,7 @@ def _have_type(element, probability, caps, decodebin): def _pad_added(element, pad, pipeline): - sink = Gst.element_factory_make('fakesink') + sink = Gst.ElementFactory.make('fakesink') sink.set_property('sync', False) pipeline.add(sink)