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)
This commit is contained in:
Zan Dobersek 2013-03-25 09:47:28 +01:00 committed by Stein Magnus Jodal
parent 3c9f4e7183
commit 228f9bbf6b

View File

@ -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')