Clean up gst.Caps initialization
There's no need for appending every audio/x-raw-* structure to the gst.Caps individually, they can all be listed inline inside the gst.Caps initialization. (cherry picked from commit 13f0bfffe17c07ddbc3a8e5fc1e29c0015502392)
This commit is contained in:
parent
b2657566f4
commit
129894c01e
@ -152,12 +152,9 @@ 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', uribin_caps)
|
||||
self.uribin.set_property('caps',
|
||||
gst.Caps(b'audio/x-raw-int; audio/x-raw-float'))
|
||||
self.uribin.connect('pad-added', self.process_new_pad)
|
||||
|
||||
self.pipe = gst.element_factory_make('pipeline')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user