:right-sidebar: True PluginFeature =================================================================== .. currentmodule:: gi.repository.Gst .. class:: PluginFeature(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Subclasses: :class:`~gi.repository.Gst.DeviceProviderFactory`, :class:`~gi.repository.Gst.DynamicTypeFactory`, :class:`~gi.repository.Gst.ElementFactory`, :class:`~gi.repository.Gst.TracerFactory`, :class:`~gi.repository.Gst.TypeFindFactory` This is a base class for anything that can be added to a :obj:`~gi.repository.Gst.Plugin`\. Methods ------- .. rst-class:: interim-class .. class:: PluginFeature :no-index: .. method:: check_version(min_major: int, min_minor: int, min_micro: int) -> bool Checks whether the given plugin feature is at least the required version. Note: Since version 1.24 this function no longer returns :const:`True` if the version is a git development version (e.g. 1.23.0.1) and the check is for the "next" micro version, that is it will no longer return :const:`True` for e.g. 1.23.0.1 if the check is for 1.23.1. It is still possible to parse the nano version from the string and do this check that way if needed. :param min_major: minimum required major version :param min_minor: minimum required minor version :param min_micro: minimum required micro version .. method:: get_plugin() -> ~gi.repository.Gst.Plugin | None Get the plugin that provides this feature. .. method:: get_plugin_name() -> str | None Get the name of the plugin that provides this feature. .. versionadded:: 1.2 .. method:: get_rank() -> int Gets the rank of a plugin feature. .. classmethod:: list_debug() -> None Debug the plugin feature names in ``list``\. .. classmethod:: list_free() -> None Unrefs each member of ``list``\, then frees the list. .. method:: load() -> ~gi.repository.Gst.PluginFeature | None Loads the plugin containing ``feature`` if it's not already loaded. ``feature`` is unaffected; use the return value instead. Normally this function is used like this: .. code-block:: C :dedent: GstPluginFeature *loaded_feature; loaded_feature = gst_plugin_feature_load (feature); // presumably, we're no longer interested in the potentially-unloaded feature gst_object_unref (feature); feature = loaded_feature; .. classmethod:: rank_compare_func(p2: ~typing.Any = None) -> int Compares the two given :obj:`~gi.repository.Gst.PluginFeature` instances. This function can be used as a :obj:`~gi.repository.GLib.CompareFunc` when sorting by rank and then by name. :param p2: a :obj:`~gi.repository.Gst.PluginFeature` .. method:: set_rank(rank: int) -> None Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature. :param rank: rank value - higher number means more priority rank