From 16955072101fa82542c002865fc0b51dd77f642c Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 29 Apr 2011 20:25:07 +0200 Subject: [PATCH 01/11] Remove eol kwarg that are only supported by pyserial.FileLike.readline, and not io.RawIOBase.readline --- mopidy/mixers/nad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b2e4f3903c6e34b7652c5018aabe710a9ac90ca1 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 29 Apr 2011 20:30:04 +0200 Subject: [PATCH 02/11] Add NadMixer fix to changelog --- docs/changes.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index 5a7db6ad..c91b2b40 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,6 +5,18 @@ Changes This change log is used to track all major changes to Mopidy. +0.4.1 (in development) +====================== + +**Bugfixes** + +- 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. + + 0.4.0 (2011-04-27) ================== From 9f130f4dfcf7cd6ec1754d51612b21ce4eeeb8ea Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 29 Apr 2011 21:44:57 +0200 Subject: [PATCH 03/11] Bump version number to 0.4.1 --- mopidy/__init__.py | 2 +- tests/version_test.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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/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()) From e3235e96208732e410a8ea807bc072970dbba619 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 29 Apr 2011 22:17:50 +0200 Subject: [PATCH 04/11] Fix for #85 - appsrc wasn't being linked due to lack of default caps --- mopidy/outputs/gstreamer.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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) From cec3c30400e80f0fafcf7924f720091501522152 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 29 Apr 2011 23:52:40 +0200 Subject: [PATCH 05/11] Update changelog with fix for GH-85 --- docs/changes.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index c91b2b40..bf7efc5f 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -10,6 +10,10 @@ This change log is used to track all major changes to Mopidy. **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 From 5830ab3377e4837f819629ab5115bd3d62884cd6 Mon Sep 17 00:00:00 2001 From: Antoine Pierlot-Garcin Date: Fri, 29 Apr 2011 20:46:34 -0400 Subject: [PATCH 06/11] Fix UnicodeDecodeError in MPD frontend on non-english locale --- mopidy/frontends/mpd/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): From df11f0523dc8bf6e169ad4b217f1824ea2bd9024 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 5 May 2011 23:57:20 +0200 Subject: [PATCH 07/11] Do not create Pykka proxies we do not use. The underlying actor may already be dead. --- mopidy/core.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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 From 9b0499bc1af169bfdf04945a158192610af1c51f Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 5 May 2011 23:59:02 +0200 Subject: [PATCH 08/11] Update changelog with UnicodeDecodeError fix from bok --- docs/changes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index bf7efc5f..fdc18a95 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -20,6 +20,8 @@ This change log is used to track all major changes to Mopidy. :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. + 0.4.0 (2011-04-27) ================== From 79fc6a11da18043a3cb88060abb8afc89c96d8ee Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 6 May 2011 00:01:03 +0200 Subject: [PATCH 09/11] Update changelog with removal of redundant Pykka proxy creation --- docs/changes.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index fdc18a95..ef28b86b 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -22,6 +22,10 @@ This change log is used to track all major changes to Mopidy. - Fix UnicodeDecodeError in MPD frontend on non-english locale. +- 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. + 0.4.0 (2011-04-27) ================== From eb13a8abd1a8abab99b050bcbc2129fc8e38e631 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 6 May 2011 00:14:09 +0200 Subject: [PATCH 10/11] Add credits and issue reference to changelog --- docs/changes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index ef28b86b..e40baffe 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -20,7 +20,8 @@ This change log is used to track all major changes to Mopidy. :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. +- 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, From ffb2985fda98e6d505be67e43147de55ecafb42c Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Fri, 6 May 2011 00:21:24 +0200 Subject: [PATCH 11/11] Update changelog for 0.4.1 release --- docs/changes.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index e40baffe..f86cef92 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,8 +5,12 @@ Changes This change log is used to track all major changes to Mopidy. -0.4.1 (in development) -====================== +0.4.1 (2011-05-06) +================== + +This is a bug fix release fixing audio problems on older GStreamer and some +minor bugs. + **Bugfixes** @@ -25,7 +29,10 @@ This change log is used to track all major changes to Mopidy. - 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. + 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)