Gst.PluginFeature

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.PluginFeature Gst.PluginFeature Gst.Object->Gst.PluginFeature

Subclasses:Gst.DeviceProviderFactory, Gst.DynamicTypeFactory, Gst.ElementFactory, Gst.TracerFactory, Gst.TypeFindFactory

Methods

Inherited:Gst.Object (27), GObject.Object (37)
Structs:GObject.ObjectClass (5)
class list_copy (list)
class list_debug (list)
class list_free (list)
class rank_compare_func (p1, p2)
  check_version (min_major, min_minor, min_micro)
  get_plugin ()
  get_plugin_name ()
  get_rank ()
  load ()
  set_rank (rank)

Virtual Methods

Inherited:Gst.Object (1), GObject.Object (7)

Properties

Inherited:Gst.Object (2)

Class Details

class Gst.PluginFeature(**kwargs)
Bases:Gst.Object
Abstract:Yes
Structure:Gst.PluginFeatureClass

This is a base class for anything that can be added to a Gst.Plugin.

classmethod list_copy(list)[source]
Parameters:list ([Gst.PluginFeature]) – list of Gst.PluginFeature
Returns:a copy of list, with each feature’s reference count incremented.
Return type:[Gst.PluginFeature]

Copies the list of features. Caller should call gst_plugin_feature_list_free when done with the list.

classmethod list_debug(list)[source]
Parameters:list ([Gst.PluginFeature]) – a GLib.List of plugin features

Debug the plugin feature names in list.

classmethod list_free(list)[source]
Parameters:list ([Gst.PluginFeature]) – list of Gst.PluginFeature

Unrefs each member of list, then frees the list.

classmethod rank_compare_func(p1, p2)[source]
Parameters:
Returns:

negative value if the rank of p1 > the rank of p2 or the ranks are equal but the name of p1 comes before the name of p2; zero if the rank and names are equal; positive value if the rank of p1 < the rank of p2 or the ranks are equal but the name of p2 comes before the name of p1

Return type:

int

Compares the two given Gst.PluginFeature instances. This function can be used as a GLib.CompareFunc when sorting by rank and then by name.

check_version(min_major, min_minor, min_micro)[source]
Parameters:
  • min_major (int) – minimum required major version
  • min_minor (int) – minimum required minor version
  • min_micro (int) – minimum required micro version
Returns:

True if the plugin feature has at least the required version, otherwise False.

Return type:

bool

Checks whether the given plugin feature is at least the required version

get_plugin()[source]
Returns:the plugin that provides this feature, or None. Unref with Gst.Object.unref() when no longer needed.
Return type:Gst.Plugin or None

Get the plugin that provides this feature.

get_plugin_name()[source]
Returns:the name of the plugin that provides this feature, or None if the feature is not associated with a plugin.
Return type:str or None

Get the name of the plugin that provides this feature.

New in version 1.2.

get_rank()[source]
Returns:The rank of the feature
Return type:int

Gets the rank of a plugin feature.

load()[source]
Returns:a reference to the loaded feature, or None on error
Return type:Gst.PluginFeature or None

Loads the plugin containing self if it’s not already loaded. self is 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;
set_rank(rank)[source]
Parameters:rank (int) – rank value - higher number means more priority rank

Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.