diff --git a/docs/changes.rst b/docs/changes.rst index 5a7db6ad..f86cef92 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,6 +5,36 @@ Changes This change log is used to track all major changes to Mopidy. +0.4.1 (2011-05-06) +================== + +This is a bug fix release fixing audio problems on older GStreamer and some +minor bugs. + + +**Bugfixes** + +- Fix broken audio on at least GStreamer 0.10.30, which affects Ubuntu 10.10. + The GStreamer `appsrc` bin wasn't being linked due to lack of default caps. + (Fixes: :issue:`85`) + +- Fix crash in :mod:`mopidy.mixers.nad` that occures at startup when the + :mod:`io` module is available. We used an `eol` keyword argument which is + supported by :meth:`serial.FileLike.readline`, but not by + :meth:`io.RawBaseIO.readline`. When the :mod:`io` module is available, it is + used by PySerial instead of the `FileLike` implementation. + +- Fix UnicodeDecodeError in MPD frontend on non-english locale. Thanks to + Antoine Pierlot-Garcin for the patch. (Fixes: :issue:`88`) + +- Do not create Pykka proxies that are not going to be used in + :mod:`mopidy.core`. The underlying actor may already intentionally be dead, + and thus the program may crash on creating a proxy it doesn't need. Combined + with the Pykka 0.12.2 release this fixes a crash in the Last.fm frontend + which may occur when all dependencies are installed, but the frontend isn't + configured. (Fixes: :issue:`84`) + + 0.4.0 (2011-04-27) ================== diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 1fbf99c8..35f5f94d 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -5,7 +5,7 @@ if not (2, 6) <= sys.version_info < (3,): from subprocess import PIPE, Popen -VERSION = (0, 4, 0) +VERSION = (0, 4, 1) def get_version(): try: diff --git a/mopidy/core.py b/mopidy/core.py index f1a9dc36..bf5c4c2a 100644 --- a/mopidy/core.py +++ b/mopidy/core.py @@ -52,25 +52,20 @@ def setup_settings(): settings.validate() def setup_gobject_loop(): - gobject_loop = GObjectEventThread() - gobject_loop.start() - return gobject_loop + GObjectEventThread().start() def setup_output(): - return get_class(settings.OUTPUT).start().proxy() + get_class(settings.OUTPUT).start() def setup_mixer(): - return get_class(settings.MIXER).start().proxy() + get_class(settings.MIXER).start() def setup_backend(): - return get_class(settings.BACKENDS[0]).start().proxy() + get_class(settings.BACKENDS[0]).start() def setup_frontends(): - frontends = [] for frontend_class_name in settings.FRONTENDS: try: - frontend = get_class(frontend_class_name).start().proxy() - frontends.append(frontend) + get_class(frontend_class_name).start() except OptionalDependencyError as e: logger.info(u'Disabled: %s (%s)', frontend_class_name, e) - return frontends diff --git a/mopidy/frontends/mpd/server.py b/mopidy/frontends/mpd/server.py index 8507e266..1be46ef4 100644 --- a/mopidy/frontends/mpd/server.py +++ b/mopidy/frontends/mpd/server.py @@ -52,7 +52,7 @@ class MpdServer(asyncore.dispatcher): self._format_hostname(settings.MPD_SERVER_HOSTNAME), settings.MPD_SERVER_PORT) except IOError, e: - logger.error('MPD server startup failed: %s' % e) + logger.error(u'MPD server startup failed: %s' % str(e).decode('utf-8')) sys.exit(1) def handle_accept(self): diff --git a/mopidy/mixers/nad.py b/mopidy/mixers/nad.py index bd53376e..62f38bb7 100644 --- a/mopidy/mixers/nad.py +++ b/mopidy/mixers/nad.py @@ -190,7 +190,7 @@ class NadTalker(ThreadingActor): # trailing whitespace. if not self._device.isOpen(): self._device.open() - result = self._device.readline(eol='\n').strip() + result = self._device.readline().strip() if result: logger.debug('Read: %s', result) return result diff --git a/mopidy/outputs/gstreamer.py b/mopidy/outputs/gstreamer.py index a6d1e9dd..11cddc42 100644 --- a/mopidy/outputs/gstreamer.py +++ b/mopidy/outputs/gstreamer.py @@ -13,6 +13,15 @@ from mopidy.outputs.base import BaseOutput logger = logging.getLogger('mopidy.outputs.gstreamer') +default_caps = gst.Caps(""" + audio/x-raw-int, + endianness=(int)1234, + channels=(int)2, + width=(int)16, + depth=(int)16, + signed=(boolean)true, + rate=(int)44100""") + class GStreamerOutput(ThreadingActor, BaseOutput): """ Audio output through `GStreamer `_. @@ -48,6 +57,7 @@ class GStreamerOutput(ThreadingActor, BaseOutput): uridecodebin = gst.element_factory_make('uridecodebin', 'uri') uridecodebin.connect('pad-added', self._process_new_pad, pad) + uridecodebin.connect('notify::source', self._process_new_source) self.gst_pipeline.add(uridecodebin) # Setup bus and message processor @@ -55,6 +65,13 @@ class GStreamerOutput(ThreadingActor, BaseOutput): gst_bus.add_signal_watch() gst_bus.connect('message', self._process_gstreamer_message) + def _process_new_source(self, element, pad): + source = element.get_by_name('source') + try: + source.set_property('caps', default_caps) + except TypeError: + pass + def _process_new_pad(self, source, pad, target_pad): pad.link(target_pad) diff --git a/tests/version_test.py b/tests/version_test.py index 7f204283..7c452c63 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -17,8 +17,9 @@ class VersionTest(unittest.TestCase): self.assert_(SV('0.1.0') < SV('1.0.0')) self.assert_(SV('0.2.0') < SV('0.3.0')) self.assert_(SV('0.3.0') < SV('0.3.1')) - self.assert_(SV('0.3.1') < SV(get_plain_version())) - self.assert_(SV(get_plain_version()) < SV('0.4.1')) + self.assert_(SV('0.3.1') < SV('0.4.0')) + self.assert_(SV('0.4.0') < SV(get_plain_version())) + self.assert_(SV(get_plain_version()) < SV('0.4.2')) def test_get_platform_contains_platform(self): self.assert_(platform.platform() in get_platform())