All pastes #633292 Raw Edit

Meins

public text v1 · immutable
#633292 ·published 2007-07-25 16:18 UTC
rendered paste body
    def uri_schemes__get(self):
        dici = {}
        reg = gst.registry_get_default()
        plugins = reg.get_plugin_list()
        for plugin in plugins:
            features = reg.get_feature_list_by_plugin(plugin.get_name())
            for feature in features:
                if isinstance(feature, gst.ElementFactory):
                    try:
                        if feature.get_uri_type():
                            import pdb; pdb.set_trace()
                            protocols = feature.get_uri_protocols()
                            for protocol in protocols:
                            ## We want only be fallback, if there is another
                            ## player for the uri
                                dici[str(protocol)] = 150
                    except AttributeError, e:
                        #FIXME: this is a work-a-round for pygst-bug #385841,
                        #       remove it as fast as possible
                        continue
        return dici


gives this:

> /opt/elisa-player-ng/elisa/plugins/base/players/playbin_player.py(108)uri_schemes__get()
-> protocols = feature.get_uri_protocols()
(Pdb) dir(feature)
['__class__', '__cmp__', '__delattr__', '__dict__', '__doc__', '__gdoc__', '__getattribute__', '__gobject_init__', '__grefcount__', '__gstrefcount__', '__gtype__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'can_sink_caps', 'can_src_caps', 'chain', 'check_version', 'connect', 'connect_after', 'connect_object', 'connect_object_after', 'create', 'debug', 'default_error', 'disconnect', 'disconnect_by_func', 'emit', 'emit_stop_by_name', 'error', 'freeze_notify', 'get_author', 'get_data', 'get_description', 'get_element_type', 'get_klass', 'get_longname', 'get_name', 'get_name_prefix', 'get_num_pad_templates', 'get_parent', 'get_path_string', 'get_property', 'get_rank', 'get_static_pad_templates', 'get_uri_type', 'handler_block', 'handler_block_by_func', 'handler_disconnect', 'handler_is_connected', 'handler_unblock', 'handler_unblock_by_func', 'has_ancestor', 'info', 'load', 'log', 'notify', 'props', 'set_data', 'set_flag', 'set_name', 'set_name_prefix', 'set_parent', 'set_property', 'set_rank', 'stop_emission', 'thaw_notify', 'unparent', 'unset_flag', 'warning']
(Pdb)