## GstPluginFeature

GstPluginFeature — Base class for contents of a GstPlugin

## Synopsis

    #include <gst/gst.h>

                GstPluginFeature;
    #define     GST_PLUGIN_FEATURE_NAME         (feature)
                GstTypeNameData;
    gboolean    (*GstPluginFeatureFilter)       (GstPluginFeature *feature,
                                                 gpointer user_data);
    gboolean    gst_plugin_feature_ensure_loaded
                                                (GstPluginFeature *feature);
    void        gst_plugin_feature_unload_thyself
                                                (GstPluginFeature *feature);
    gboolean    gst_plugin_feature_type_name_filter
                                                (GstPluginFeature *feature,
                                                 GstTypeNameData *data);
    void        gst_plugin_feature_set_rank     (GstPluginFeature *feature,
                                                 guint rank);
    void        gst_plugin_feature_set_name     (GstPluginFeature *feature,
                                                 const gchar *name);
    guint       gst_plugin_feature_get_rank     (GstPluginFeature *feature);
    const gchar* gst_plugin_feature_get_name    (GstPluginFeature *feature);

## Object Hierarchy

      GObject
       +----GstPluginFeature
             +----GstElementFactory
             +----GstSchedulerFactory
             +----GstTypeFindFactory
             +----GstIndexFactory

## Description

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

## Details

### GstPluginFeature

    typedef struct _GstPluginFeature GstPluginFeature;

### GST_PLUGIN_FEATURE_NAME()

    #define GST_PLUGIN_FEATURE_NAME(feature)  (GST_PLUGIN_FEATURE (feature)->name)

Get the name of the feature

`feature` : | The feature to query

### GstTypeNameData

    typedef struct {
      const gchar 	*name;
      GType		 type;
    } GstTypeNameData;

### 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.

`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_plugin_feature_ensure_loaded ()

    gboolean    gst_plugin_feature_ensure_loaded
                                                (GstPluginFeature *feature);

Check if the plugin containing the feature is loaded, if not, the plugin will be loaded.

`feature` : | the plugin feature to check
Returns : | a boolean indicating the feature is loaded.

### gst_plugin_feature_unload_thyself ()

    void        gst_plugin_feature_unload_thyself
                                                (GstPluginFeature *feature);

Unload the given feature. This will decrease the refcount in the plugin and will eventually unload the plugin

`feature` : | the plugin feature to check

### gst_plugin_feature_type_name_filter ()

    gboolean    gst_plugin_feature_type_name_filter
                                                (GstPluginFeature *feature,
                                                 GstTypeNameData *data);

`feature` : |
`data` : |
Returns : |

### gst_plugin_feature_set_rank ()

    void        gst_plugin_feature_set_rank     (GstPluginFeature *feature,
                                                 guint rank);

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

`feature` : | feature to rank
`rank` : | rank value - higher number means more priority rank

### gst_plugin_feature_set_name ()

    void        gst_plugin_feature_set_name     (GstPluginFeature *feature,
                                                 const gchar *name);

Sets the name of a plugin feature. The name uniquely identifies a feature within all features of the same type. Renaming a plugin feature is not allowed.

`feature` : | a feature
`name` : | the name to set

### gst_plugin_feature_get_rank ()

    guint       gst_plugin_feature_get_rank     (GstPluginFeature *feature);

`feature` : |
Returns : |

### gst_plugin_feature_get_name ()

    const gchar* gst_plugin_feature_get_name    (GstPluginFeature *feature);

Gets the name of a plugin feature.

`feature` : | a feature
Returns : | the name

## See Also

GstPlugin