# GstPluginfeature

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

## GstPluginFeature

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstPluginFeature
                    ╰──GstDeviceProviderFactory
                    ╰──GstDynamicTypeFactory
                    ╰──GstElementFactory
                    ╰──GstTracerFactory
                    ╰──GstTypeFindFactory

Opaque GstPluginFeature structure.

### Class structure

#### GstPluginFeatureClass

### Gst.PluginFeatureClass

## Gst.PluginFeature

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.PluginFeature
                    ╰──Gst.DeviceProviderFactory
                    ╰──Gst.DynamicTypeFactory
                    ╰──Gst.ElementFactory
                    ╰──Gst.TracerFactory
                    ╰──Gst.TypeFindFactory

Opaque Gst.PluginFeature structure.

## Gst.PluginFeature

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.PluginFeature
                    ╰──Gst.DeviceProviderFactory
                    ╰──Gst.DynamicTypeFactory
                    ╰──Gst.ElementFactory
                    ╰──Gst.TracerFactory
                    ╰──Gst.TypeFindFactory

Opaque Gst.PluginFeature structure.

### Methods

#### gst_plugin_feature_check_version

    gboolean
    gst_plugin_feature_check_version (GstPluginFeature * feature,
                                      guint min_major,
                                      guint min_minor,
                                      guint min_micro)

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

Note: Since version 1.24 this function no longer returns 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 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.

Parameters:

`feature` –

a feature

`min_major` –

minimum required major version

`min_minor` –

minimum required minor version

`min_micro` –

minimum required micro version

Returns –

TRUE if the plugin feature has at least the required version, otherwise FALSE.

#### Gst.PluginFeature.prototype.check_version

    function Gst.PluginFeature.prototype.check_version(min_major: Number, min_minor: Number, min_micro: Number): {
        // javascript wrapper for 'gst_plugin_feature_check_version'
    }

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

Note: Since version 1.24 this function no longer returns 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 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.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

`min_major` (Number) –

minimum required major version

`min_minor` (Number) –

minimum required minor version

`min_micro` (Number) –

minimum required micro version

Returns (Number) –

TRUE if the plugin feature has at least the required version, otherwise FALSE.

#### Gst.PluginFeature.check_version

    def Gst.PluginFeature.check_version (self, min_major, min_minor, min_micro):
        #python wrapper for 'gst_plugin_feature_check_version'

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

Note: Since version 1.24 this function no longer returns 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 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.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

`min_major` (int) –

minimum required major version

`min_minor` (int) –

minimum required minor version

`min_micro` (int) –

minimum required micro version

Returns (bool) –

TRUE if the plugin feature has at least the required version, otherwise FALSE.

#### gst_plugin_feature_get_plugin

    GstPlugin *
    gst_plugin_feature_get_plugin (GstPluginFeature * feature)

Get the plugin that provides this feature.

Parameters:

`feature` –

a feature

Returns ( [transfer: full][nullable]) –

the plugin that provides this feature, or NULL. Unref with gst_object_unref when no longer needed.

#### Gst.PluginFeature.prototype.get_plugin

    function Gst.PluginFeature.prototype.get_plugin(): {
        // javascript wrapper for 'gst_plugin_feature_get_plugin'
    }

Get the plugin that provides this feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (Gst.Plugin) –

the plugin that provides this feature, or NULL. Unref with Gst.Object.prototype.unref when no longer needed.

#### Gst.PluginFeature.get_plugin

    def Gst.PluginFeature.get_plugin (self):
        #python wrapper for 'gst_plugin_feature_get_plugin'

Get the plugin that provides this feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (Gst.Plugin) –

the plugin that provides this feature, or NULL. Unref with Gst.Object.unref when no longer needed.

#### gst_plugin_feature_get_plugin_name

    const gchar*
    gst_plugin_feature_get_plugin_name (GstPluginFeature * feature)

Get the name of the plugin that provides this feature.

Parameters:

`feature` –

a feature

Returns ( [nullable]) –

the name of the plugin that provides this feature, or NULL if the feature is not associated with a plugin.

Since : 1.2

#### Gst.PluginFeature.prototype.get_plugin_name

    function Gst.PluginFeature.prototype.get_plugin_name(): {
        // javascript wrapper for 'gst_plugin_feature_get_plugin_name'
    }

Get the name of the plugin that provides this feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (String) –

the name of the plugin that provides this feature, or NULL if the feature is not associated with a plugin.

Since : 1.2

#### Gst.PluginFeature.get_plugin_name

    def Gst.PluginFeature.get_plugin_name (self):
        #python wrapper for 'gst_plugin_feature_get_plugin_name'

Get the name of the plugin that provides this feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (str) –

the name of the plugin that provides this feature, or NULL if the feature is not associated with a plugin.

Since : 1.2

#### gst_plugin_feature_get_rank

    guint
    gst_plugin_feature_get_rank (GstPluginFeature * feature)

Gets the rank of a plugin feature.

Parameters:

`feature` –

a feature

Returns –

The rank of the feature

#### Gst.PluginFeature.prototype.get_rank

    function Gst.PluginFeature.prototype.get_rank(): {
        // javascript wrapper for 'gst_plugin_feature_get_rank'
    }

Gets the rank of a plugin feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (Number) –

The rank of the feature

#### Gst.PluginFeature.get_rank

    def Gst.PluginFeature.get_rank (self):
        #python wrapper for 'gst_plugin_feature_get_rank'

Gets the rank of a plugin feature.

Parameters:

`feature` (Gst.PluginFeature) –

a feature

Returns (int) –

The rank of the feature

#### gst_plugin_feature_load

    GstPluginFeature *
    gst_plugin_feature_load (GstPluginFeature * feature)

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:

     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;

Parameters:

`feature` ( [transfer: none]) –

the plugin feature to check

Returns ( [transfer: full][nullable]) –

a reference to the loaded feature, or NULL on error

#### Gst.PluginFeature.prototype.load

    function Gst.PluginFeature.prototype.load(): {
        // javascript wrapper for 'gst_plugin_feature_load'
    }

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:

     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;

Parameters:

`feature` (Gst.PluginFeature) –

the plugin feature to check

Returns (Gst.PluginFeature) –

a reference to the loaded feature, or NULL on error

#### Gst.PluginFeature.load

    def Gst.PluginFeature.load (self):
        #python wrapper for 'gst_plugin_feature_load'

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:

     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;

Parameters:

`feature` (Gst.PluginFeature) –

the plugin feature to check

Returns (Gst.PluginFeature) –

a reference to the loaded feature, or NULL on error

#### gst_plugin_feature_set_rank

    gst_plugin_feature_set_rank (GstPluginFeature * feature,
                                 guint rank)

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

Parameters:

`feature` –

feature to rank

`rank` –

rank value - higher number means more priority rank

#### Gst.PluginFeature.prototype.set_rank

    function Gst.PluginFeature.prototype.set_rank(rank: Number): {
        // javascript wrapper for 'gst_plugin_feature_set_rank'
    }

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

Parameters:

`feature` (Gst.PluginFeature) –

feature to rank

`rank` (Number) –

rank value - higher number means more priority rank

#### Gst.PluginFeature.set_rank

    def Gst.PluginFeature.set_rank (self, rank):
        #python wrapper for 'gst_plugin_feature_set_rank'

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

Parameters:

`feature` (Gst.PluginFeature) –

feature to rank

`rank` (int) –

rank value - higher number means more priority rank

### Functions

#### gst_plugin_feature_list_copy

    GList *
    gst_plugin_feature_list_copy (GList * list)

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

Parameters:

`list` ( [transfer: none][element-typeGst.PluginFeature]) –

list of GstPluginFeature

Returns ( [transfer: full][element-typeGst.PluginFeature]) –

a copy of list, with each feature's reference count incremented.

#### Gst.PluginFeature.prototype.list_copy

    function Gst.PluginFeature.prototype.list_copy(list: [ Gst.PluginFeature ]): {
        // javascript wrapper for 'gst_plugin_feature_list_copy'
    }

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

Parameters:

`list` ([ Gst.PluginFeature ]) –

list of Gst.PluginFeature

Returns ([ Gst.PluginFeature ]) –

a copy of list, with each feature's reference count incremented.

#### Gst.PluginFeature.list_copy

    def Gst.PluginFeature.list_copy (list):
        #python wrapper for 'gst_plugin_feature_list_copy'

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

Parameters:

`list` ([ Gst.PluginFeature ]) –

list of Gst.PluginFeature

Returns ([ Gst.PluginFeature ]) –

a copy of list, with each feature's reference count incremented.

#### gst_plugin_feature_list_debug

    gst_plugin_feature_list_debug (GList * list)

Debug the plugin feature names in list.

Parameters:

`list` ( [transfer: none][element-typeGst.PluginFeature]) –

a GList of plugin features

#### Gst.PluginFeature.prototype.list_debug

    function Gst.PluginFeature.prototype.list_debug(list: [ Gst.PluginFeature ]): {
        // javascript wrapper for 'gst_plugin_feature_list_debug'
    }

Debug the plugin feature names in list.

Parameters:

`list` ([ Gst.PluginFeature ]) –

a GLib.List of plugin features

#### Gst.PluginFeature.list_debug

    def Gst.PluginFeature.list_debug (list):
        #python wrapper for 'gst_plugin_feature_list_debug'

Debug the plugin feature names in list.

Parameters:

`list` ([ Gst.PluginFeature ]) –

a GLib.List of plugin features

#### gst_plugin_feature_list_free

    gst_plugin_feature_list_free (GList * list)

Unrefs each member of list, then frees the list.

Parameters:

`list` ( [transfer: full][element-typeGst.PluginFeature]) –

list of GstPluginFeature

#### Gst.PluginFeature.prototype.list_free

    function Gst.PluginFeature.prototype.list_free(list: [ Gst.PluginFeature ]): {
        // javascript wrapper for 'gst_plugin_feature_list_free'
    }

Unrefs each member of list, then frees the list.

Parameters:

`list` ([ Gst.PluginFeature ]) –

list of Gst.PluginFeature

#### Gst.PluginFeature.list_free

    def Gst.PluginFeature.list_free (list):
        #python wrapper for 'gst_plugin_feature_list_free'

Unrefs each member of list, then frees the list.

Parameters:

`list` ([ Gst.PluginFeature ]) –

list of Gst.PluginFeature

#### gst_plugin_feature_rank_compare_func

    gint
    gst_plugin_feature_rank_compare_func (gconstpointer p1,
                                          gconstpointer p2)

Compares the two given GstPluginFeature instances. This function can be used as a GCompareFunc when sorting by rank and then by name.

Parameters:

`p1` –

a GstPluginFeature

`p2` –

a GstPluginFeature

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

#### Gst.PluginFeature.prototype.rank_compare_func

    function Gst.PluginFeature.prototype.rank_compare_func(p1: Object, p2: Object): {
        // javascript wrapper for 'gst_plugin_feature_rank_compare_func'
    }

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

Parameters:

`p1` (Object) –

a Gst.PluginFeature

`p2` (Object) –

a Gst.PluginFeature

Returns (Number) –

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

#### Gst.PluginFeature.rank_compare_func

    def Gst.PluginFeature.rank_compare_func (p1, p2):
        #python wrapper for 'gst_plugin_feature_rank_compare_func'

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

Parameters:

`p1` (object) –

a Gst.PluginFeature

`p2` (object) –

a Gst.PluginFeature

Returns (int) –

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

## Function Macros

### GST_PLUGIN_FEATURE_CAST

    #define GST_PLUGIN_FEATURE_CAST(obj)            ((GstPluginFeature*)(obj))

### GST_PLUGIN_FEATURE_LIST_DEBUG

    #define GST_PLUGIN_FEATURE_LIST_DEBUG(list) gst_plugin_feature_list_debug(list)

Debug the plugin feature names in list.

Parameters:

`list` ( [transfer: none][element-typeGst.PluginFeature]) –

a GList of plugin features

### gst_plugin_feature_get_name

    #define gst_plugin_feature_get_name(feature)      GST_OBJECT_NAME(feature)

Returns the name of feature. For a nameless plugin feature, this returns NULL.

Parameters:

`feature` –

a GstPluginFeature to get the name of feature.

Returns ( [transfer: none][nullable]) –

the name of feature. MT safe.

### gst_plugin_feature_set_name

    #define gst_plugin_feature_set_name(feature,name) gst_object_set_name(GST_OBJECT_CAST(feature),name)

Sets the name of the plugin feature, getting rid of the old name if there was one.

Parameters:

`feature` –

a GstPluginFeature to set the name of.

`name` –

the new name

## Enumerations

### GstRank

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri) will choose this element over an alternative one with the same function.

These constants serve as a rough guidance for defining the rank of a GstPluginFeature. Any value is valid, including values bigger than GST_RANK_PRIMARY.

##### Members

`GST_RANK_NONE` (0) –

will be chosen last or not at all

`GST_RANK_MARGINAL` (64) –

unlikely to be chosen

`GST_RANK_SECONDARY` (128) –

likely to be chosen

`GST_RANK_PRIMARY` (256) –

will be chosen first

### Gst.Rank

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. Gst.Element.prototype.make_from_uri) will choose this element over an alternative one with the same function.

These constants serve as a rough guidance for defining the rank of a Gst.PluginFeature. Any value is valid, including values bigger than GST_RANK_PRIMARY.

##### Members

`Gst.Rank.NONE` (0) –

will be chosen last or not at all

`Gst.Rank.MARGINAL` (64) –

unlikely to be chosen

`Gst.Rank.SECONDARY` (128) –

likely to be chosen

`Gst.Rank.PRIMARY` (256) –

will be chosen first

### Gst.Rank

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. Gst.Element.make_from_uri) will choose this element over an alternative one with the same function.

These constants serve as a rough guidance for defining the rank of a Gst.PluginFeature. Any value is valid, including values bigger than GST_RANK_PRIMARY.

##### Members

`Gst.Rank.NONE` (0) –

will be chosen last or not at all

`Gst.Rank.MARGINAL` (64) –

unlikely to be chosen

`Gst.Rank.SECONDARY` (128) –

likely to be chosen

`Gst.Rank.PRIMARY` (256) –

will be chosen first

## Callbacks

### GstPluginFeatureFilter

    gboolean
    (*GstPluginFeatureFilter) (GstPluginFeature * feature,
                               gpointer user_data)

A function that can be used with e.g. gst_registry_feature_filter to get a list of pluginfeature that match certain criteria.

Parameters:

`feature` –

the pluginfeature to check

`user_data` –

the user_data that has been passed on e.g. gst_registry_feature_filter

Returns –

TRUE for a positive match, FALSE otherwise

### Gst.PluginFeatureFilter

    function Gst.PluginFeatureFilter(feature: Gst.PluginFeature, user_data: Object): {
        // javascript wrapper for 'GstPluginFeatureFilter'
    }

A function that can be used with e.g. Gst.Registry.prototype.feature_filter to get a list of pluginfeature that match certain criteria.

Parameters:

`feature` (Gst.PluginFeature) –

the pluginfeature to check

`user_data` (Object) –

the user_data that has been passed on e.g. Gst.Registry.prototype.feature_filter

Returns (Number) –

TRUE for a positive match, FALSE otherwise

### Gst.PluginFeatureFilter

    def Gst.PluginFeatureFilter (feature, *user_data):
        #python wrapper for 'GstPluginFeatureFilter'

A function that can be used with e.g. Gst.Registry.feature_filter to get a list of pluginfeature that match certain criteria.

Parameters:

`feature` (Gst.PluginFeature) –

the pluginfeature to check

`user_data` (variadic) –

the user_data that has been passed on e.g. Gst.Registry.feature_filter

Returns (bool) –

TRUE for a positive match, FALSE otherwise

The results of the search are