:right-sidebar: True Registry =================================================================== .. currentmodule:: gi.repository.Gst .. class:: Registry(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` :Constructors: :: Registry(**properties) Methods ------- .. rst-class:: interim-class .. class:: Registry :no-index: .. method:: add_feature(feature: ~gi.repository.Gst.PluginFeature) -> bool Add the feature to the registry. The feature-added signal will be emitted. ``feature``'s reference count will be incremented, and any floating reference will be removed (see :func:`~gi.repository.Gst.Object.ref_sink`) :param feature: the feature to add .. method:: add_plugin(plugin: ~gi.repository.Gst.Plugin) -> bool Add the plugin to the registry. The plugin-added signal will be emitted. ``plugin``'s reference count will be incremented, and any floating reference will be removed (see :func:`~gi.repository.Gst.Object.ref_sink`) :param plugin: the plugin to add .. method:: check_feature_version(feature_name: str, min_major: int, min_minor: int, min_micro: int) -> bool Checks whether a plugin feature by the given name exists in ``registry`` and whether its version is at least the version required. :param feature_name: the name of the feature (e.g. "oggdemux") :param min_major: the minimum major version number :param min_minor: the minimum minor version number :param min_micro: the minimum micro version number .. method:: feature_filter(filter: ~typing.Callable[[...], bool], first: bool, *user_data: ~typing.Any) -> list[~gi.repository.Gst.PluginFeature] Runs a filter against all features of the plugins in the registry and returns a GList with the results. If the first flag is set, only the first match is returned (as a list with a single object). :param filter: the filter to use :param first: only return first match :param user_data: user data passed to the filter function .. method:: find_feature(name: str, type: type) -> ~gi.repository.Gst.PluginFeature | None Find the pluginfeature with the given name and type in the registry. :param name: the pluginfeature name to find :param type: the pluginfeature type to find .. method:: find_plugin(name: str) -> ~gi.repository.Gst.Plugin | None Find the plugin with the given name in the registry. The plugin will be reffed; caller is responsible for unreffing. :param name: the plugin name to find .. method:: fork_is_enabled() -> bool By default GStreamer will perform scanning and rebuilding of the registry file using a helper child process. Applications might want to disable this behaviour with the :func:`~gi.repository.Gst.Registry.fork_set_enabled` function, in which case new plugins are scanned (and loaded) into the application process. .. method:: fork_set_enabled(enabled: bool) -> None Applications might want to disable/enable spawning of a child helper process when rebuilding the registry. See :func:`~gi.repository.Gst.Registry.fork_is_enabled` for more information. :param enabled: whether rebuilding the registry can use a temporary child helper process. .. method:: get() -> ~gi.repository.Gst.Registry Retrieves the singleton plugin registry. The caller does not own a reference on the registry, as it is alive as long as GStreamer is initialized. .. method:: get_feature_list(type: type) -> list[~gi.repository.Gst.PluginFeature] Retrieves a ``GList`` of :obj:`~gi.repository.Gst.PluginFeature` of ``type``. :param type: a :obj:`~gi.repository.GObject.Type`. .. method:: get_feature_list_by_plugin(name: str) -> list[~gi.repository.Gst.PluginFeature] Retrieves a ``GList`` of features of the plugin with name ``name``. :param name: a plugin name. .. method:: get_feature_list_cookie() -> int Returns the registry's feature list cookie. This changes every time a feature is added or removed from the registry. .. method:: get_plugin_list() -> list[~gi.repository.Gst.Plugin] Get a copy of all plugins registered in the given registry. The refcount of each element in the list in incremented. .. method:: lookup(filename: str) -> ~gi.repository.Gst.Plugin | None Look up a plugin in the given registry with the given filename. If found, plugin is reffed. :param filename: the name of the file to look up .. method:: lookup_feature(name: str) -> ~gi.repository.Gst.PluginFeature | None Find a :obj:`~gi.repository.Gst.PluginFeature` with ``name`` in ``registry``. :param name: a :obj:`~gi.repository.Gst.PluginFeature` name .. method:: plugin_filter(filter: ~typing.Callable[[...], bool], first: bool, *user_data: ~typing.Any) -> list[~gi.repository.Gst.Plugin] Runs a filter against all plugins in the registry and returns a ``GList`` with the results. If the first flag is set, only the first match is returned (as a list with a single object). Every plugin is reffed; use :func:`~gi.repository.Gst.Plugin.list_free` after use, which will unref again. :param filter: the filter to use :param first: only return first match :param user_data: user data passed to the filter function .. method:: remove_feature(feature: ~gi.repository.Gst.PluginFeature) -> None Remove the feature from the registry. MT safe. :param feature: the feature to remove .. method:: remove_plugin(plugin: ~gi.repository.Gst.Plugin) -> None Remove the plugin from the registry. MT safe. :param plugin: the plugin to remove .. method:: scan_path(path: str) -> bool Scan the given path for plugins to add to the registry. The syntax of the path is specific to the registry. :param path: the path to scan Signals ------- .. rst-class:: interim-class .. class:: Registry.signals :no-index: .. method:: feature_added(feature: ~gi.repository.Gst.PluginFeature) -> None Signals that a feature has been added to the registry (possibly replacing a previously-added one by the same name) :param feature: the feature that has been added .. method:: plugin_added(plugin: ~gi.repository.Gst.Plugin) -> None Signals that a plugin has been added to the registry (possibly replacing a previously-added one by the same name) :param plugin: the plugin that has been added Fields ------ .. rst-class:: interim-class .. class:: Registry :no-index: .. attribute:: object .. attribute:: priv