gst1: Replace Caps() with Caps.from_string()
And audio/x-raw-int and audio/x-raw-float with audio/x-raw
This commit is contained in:
parent
aa3650bf34
commit
c8ad7e3a41
@ -560,7 +560,7 @@ class Audio(pykka.ThreadingActor):
|
||||
:type seek_data: callable which takes time position in ms
|
||||
"""
|
||||
self._appsrc.prepare(
|
||||
Gst.Caps(bytes(caps)), need_data, enough_data, seek_data)
|
||||
Gst.Caps.from_string(caps), need_data, enough_data, seek_data)
|
||||
self._playbin.set_property('uri', 'appsrc://')
|
||||
|
||||
def emit_data(self, buffer_):
|
||||
|
||||
@ -14,8 +14,6 @@ from mopidy.internal import encoding
|
||||
_Result = collections.namedtuple(
|
||||
'Result', ('uri', 'tags', 'duration', 'seekable', 'mime', 'playable'))
|
||||
|
||||
_RAW_AUDIO = Gst.Caps(b'audio/x-raw-int; audio/x-raw-float')
|
||||
|
||||
|
||||
# TODO: replace with a scan(uri, timeout=1000, proxy_config=None)?
|
||||
class Scanner(object):
|
||||
@ -104,7 +102,7 @@ def _pad_added(element, pad, pipeline):
|
||||
sink.sync_state_with_parent()
|
||||
pad.link(sink.get_static_pad('sink'))
|
||||
|
||||
if pad.query_caps().is_subset(_RAW_AUDIO):
|
||||
if pad.query_caps().is_subset(Gst.Caps.from_string('audio/x-raw')):
|
||||
struct = Gst.Structure('have-audio')
|
||||
element.get_bus().post(Gst.message_new_application(element, struct))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user