From 228f9bbf6b87741bdb4415f0c600020463dbc228 Mon Sep 17 00:00:00 2001 From: Zan Dobersek Date: Mon, 25 Mar 2013 09:47:28 +0100 Subject: [PATCH] Scanner doesn't work with Ogg Vorbis files Enhance the caps for the uridecodebin element by appending to them structures covering both audio/x-raw-int and audio/x-raw-float formats. (cherry picked from commit bc33fce7b1e30745a4d2fc7e96e1a3c2640cc40e) --- mopidy/scanner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mopidy/scanner.py b/mopidy/scanner.py index bfeb9fd1..041f6fc4 100644 --- a/mopidy/scanner.py +++ b/mopidy/scanner.py @@ -152,8 +152,12 @@ class Scanner(object): self.fakesink.set_property('signal-handoffs', True) self.fakesink.connect('handoff', self.process_handoff) + uribin_caps = gst.Caps() + uribin_caps.append_structure(gst.structure_from_string(b'audio/x-raw-int')) + uribin_caps.append_structure(gst.structure_from_string(b'audio/x-raw-float')) + self.uribin = gst.element_factory_make('uridecodebin') - self.uribin.set_property('caps', gst.Caps(b'audio/x-raw-int')) + self.uribin.set_property('caps', uribin_caps) self.uribin.connect('pad-added', self.process_new_pad) self.pipe = gst.element_factory_make('pipeline')