gst1: Replace TYPE_ELEMENT_FACTORY with ElementFactory

This commit is contained in:
Stein Magnus Jodal 2015-09-02 01:18:47 +02:00
parent 8aad1d1846
commit a2b009c581
3 changed files with 3 additions and 4 deletions

View File

@ -421,8 +421,7 @@ class Audio(pykka.ThreadingActor):
# TODO: move out of audio actor?
# Fix for https://github.com/mopidy/mopidy/issues/604
registry = Gst.Registry.get()
jacksink = registry.find_feature(
'jackaudiosink', Gst.TYPE_ELEMENT_FACTORY)
jacksink = registry.find_feature('jackaudiosink', Gst.ElementFactory)
if jacksink:
jacksink.set_rank(Gst.RANK_SECONDARY)

View File

@ -57,7 +57,7 @@ def supported_uri_schemes(uri_schemes):
supported_schemes = set()
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():
if uri in uri_schemes:
supported_schemes.add(uri)

View File

@ -186,6 +186,6 @@ def _gstreamer_check_elements():
]
known_elements = [
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 [
(element, element in known_elements) for element in elements_to_check]