gst1: Replace TYPE_ELEMENT_FACTORY with ElementFactory
This commit is contained in:
parent
8aad1d1846
commit
a2b009c581
@ -421,8 +421,7 @@ class Audio(pykka.ThreadingActor):
|
|||||||
# TODO: move out of audio actor?
|
# TODO: move out of audio actor?
|
||||||
# Fix for https://github.com/mopidy/mopidy/issues/604
|
# Fix for https://github.com/mopidy/mopidy/issues/604
|
||||||
registry = Gst.Registry.get()
|
registry = Gst.Registry.get()
|
||||||
jacksink = registry.find_feature(
|
jacksink = registry.find_feature('jackaudiosink', Gst.ElementFactory)
|
||||||
'jackaudiosink', Gst.TYPE_ELEMENT_FACTORY)
|
|
||||||
if jacksink:
|
if jacksink:
|
||||||
jacksink.set_rank(Gst.RANK_SECONDARY)
|
jacksink.set_rank(Gst.RANK_SECONDARY)
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ def supported_uri_schemes(uri_schemes):
|
|||||||
supported_schemes = set()
|
supported_schemes = set()
|
||||||
registry = Gst.Registry.get()
|
registry = Gst.Registry.get()
|
||||||
|
|
||||||
for factory in registry.get_feature_list(Gst.TYPE_ELEMENT_FACTORY):
|
for factory in registry.get_feature_list(Gst.ElementFactory):
|
||||||
for uri in factory.get_uri_protocols():
|
for uri in factory.get_uri_protocols():
|
||||||
if uri in uri_schemes:
|
if uri in uri_schemes:
|
||||||
supported_schemes.add(uri)
|
supported_schemes.add(uri)
|
||||||
|
|||||||
@ -186,6 +186,6 @@ def _gstreamer_check_elements():
|
|||||||
]
|
]
|
||||||
known_elements = [
|
known_elements = [
|
||||||
factory.get_name() for factory in
|
factory.get_name() for factory in
|
||||||
Gst.Registry.get().get_feature_list(Gst.TYPE_ELEMENT_FACTORY)]
|
Gst.Registry.get().get_feature_list(Gst.ElementFactory)]
|
||||||
return [
|
return [
|
||||||
(element, element in known_elements) for element in elements_to_check]
|
(element, element in known_elements) for element in elements_to_check]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user