From ada7641ee63f4805b950d63b37f8f540b7af5dd9 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 7 Sep 2014 23:27:35 +0200 Subject: [PATCH] audio: Remove visualizer support --- docs/changelog.rst | 5 +++++ docs/config.rst | 11 ----------- mopidy/audio/actor.py | 17 ----------------- mopidy/config/__init__.py | 2 +- mopidy/config/default.conf | 3 +-- 5 files changed, 7 insertions(+), 31 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index f2182e33..2f6fa923 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,6 +25,11 @@ v0.20.0 (UNRELEASED) - Improved GStreamer related debug logging. - Provide better error messages for missing plugins. - Add foundation for trying to re-add multiple output support. +- Kill support for visualizers. Feature was originally added as a workaround for + all the people asking for ncmpcpp visualizer support. And since we could get + it almost for free thanks to GStreamer. But this feature didn't really ever + make sense for a server such as Mopidy. Currently the only way to find out if + it is in use and will be missed is to go ahead and remove it. v0.19.4 (2014-09-01) diff --git a/docs/config.rst b/docs/config.rst index f5f6bd19..03bb83ac 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -93,17 +93,6 @@ Audio configuration ``gst-inspect-0.10`` to see what output properties can be set on the sink. For example: ``gst-inspect-0.10 shout2send`` -.. confval:: audio/visualizer - - Visualizer to use. - - Can be left blank if no visualizer is desired. Otherwise this expects a - GStreamer visualizer. Typical values are ``monoscope``, ``goom``, - ``goom2k1`` or one of the `libvisual`_ visualizers. - -.. _libvisual: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-plugin-libvisual.html - - Logging configuration --------------------- diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 9db6fbf5..5cea9f7b 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -49,7 +49,6 @@ MB = 1 << 20 # Default flags to use for playbin: AUDIO, SOFT_VOLUME, DOWNLOAD PLAYBIN_FLAGS = (1 << 1) | (1 << 4) | (1 << 7) -PLAYBIN_VIS_FLAGS = PLAYBIN_FLAGS | (1 << 3) # These are just to long to wrap nicely, so rename them locally. _get_missing_description = gst.pbutils.missing_plugin_message_get_description @@ -445,7 +444,6 @@ class Audio(pykka.ThreadingActor): self._setup_playbin() self._setup_output() self._setup_mixer() - self._setup_visualizer() except gobject.GError as ex: logger.exception(ex) process.exit_process() @@ -508,21 +506,6 @@ class Audio(pykka.ThreadingActor): if self.mixer: self.mixer.teardown() - def _setup_visualizer(self): - # TODO: kill - visualizer_element = self._config['audio']['visualizer'] - if not visualizer_element: - return - try: - visualizer = gst.element_factory_make(visualizer_element) - self._playbin.set_property('vis-plugin', visualizer) - self._playbin.set_property('flags', PLAYBIN_VIS_FLAGS) - logger.info('Audio visualizer set to "%s"', visualizer_element) - except gobject.GError as ex: - logger.error( - 'Failed to create audio visualizer "%s": %s', - visualizer_element, ex) - def _on_about_to_finish(self, element): gst_logger.debug('Got about-to-finish event.') if self._about_to_finish_callback: diff --git a/mopidy/config/__init__.py b/mopidy/config/__init__.py index 61971875..7c0898aa 100644 --- a/mopidy/config/__init__.py +++ b/mopidy/config/__init__.py @@ -28,7 +28,7 @@ _audio_schema['mixer'] = String() _audio_schema['mixer_track'] = Deprecated() _audio_schema['mixer_volume'] = Integer(optional=True, minimum=0, maximum=100) _audio_schema['output'] = String() -_audio_schema['visualizer'] = String(optional=True) +_audio_schema['visualizer'] = Deprecated() _proxy_schema = ConfigSchema('proxy') _proxy_schema['scheme'] = String(optional=True, diff --git a/mopidy/config/default.conf b/mopidy/config/default.conf index 6a900cf9..42edbbbd 100644 --- a/mopidy/config/default.conf +++ b/mopidy/config/default.conf @@ -9,11 +9,10 @@ config_file = mixer = software mixer_volume = output = autoaudiosink -visualizer = [proxy] scheme = hostname = -port = +port = username = password =