PluginFeature#
Superclasses: Object, InitiallyUnowned, Object
Subclasses: DeviceProviderFactory, DynamicTypeFactory, ElementFactory, MetaFactory, TracerFactory, TypeFindFactory
This is a base class for anything that can be added to a Plugin.
Methods#
- class PluginFeature
- 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
Trueif 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 returnTruefor 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.- Parameters:
min_major – minimum required major version
min_minor – minimum required minor version
min_micro – minimum required micro version
- Returns:
Trueif the GStreamer version is greater or equal tomajor.``minor``.``micro``,Falseotherwise. Also this function returnsFalsewhen checking for a differentmajorversion to the current one, as major version bumps are ABI breaks anyway.
- get_plugin_name() str | None#
Get the name of the plugin that provides this feature.
Added in version 1.2.
- classmethod list_debug(list: list[PluginFeature]) None#
Debug the plugin feature names in
list.- Parameters:
list – a
GListof plugin features
- classmethod list_free(list: list[PluginFeature]) None#
Unrefs each member of
list, then frees the list.- Parameters:
list – list of
PluginFeature
- load() PluginFeature | None#
Loads the plugin containing
featureif it’s not already loaded.featureis unaffected; use the return value instead.Normally this function is used like this:
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(p1: Any = None, p2: Any = None) int#
Compares the two given
PluginFeatureinstances. This function can be used as aCompareFuncwhen sorting by rank and then by name.- Parameters:
p1 – a
PluginFeaturep2 – a
PluginFeature