![]() |
![]() |
![]() |
GStreamer 0.10 Core Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/gst.h> GstPluginFeature; #define GST_PLUGIN_FEATURE_NAME (feature) GstTypeNameData; gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data); enum GstRank; 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); GstPluginFeature* gst_plugin_feature_load (GstPluginFeature *feature); void gst_plugin_feature_list_free (GList *list); gboolean gst_plugin_feature_check_version (GstPluginFeature *feature, guint min_major, guint min_minor, guint min_micro);
GObject +----GstObject +----GstPluginFeature +----GstElementFactory +----GstTypeFindFactory +----GstIndexFactory
typedef struct _GstPluginFeature GstPluginFeature;
Opaque GstPluginFeature structure.
#define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
Get the name of the feature
feature
:feature
The feature to query
The feature to query
feature : |
The feature to query |
typedef struct { const gchar *name; GType type; } GstTypeNameData;
Structure used for filtering based on name
and type
.
name
;gcharname
a name
a name
GType type
;GTypetype
a GType
a GType
const gchar *name ; |
a name |
GType type ; |
a GType |
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
:feature
the pluginfeature to check
the pluginfeature to check
user_data
:user_data
the user_data that has been passed on e.g.
gst_registry_feature_filter()
the user_data that has been passed on e.g.
gst_registry_feature_filter()
gst_registry_feature_filter()
gst_registry_feature_filter()
Returns :Returns TRUE
for a positive match, FALSE
otherwise
TRUE
for a positive match, FALSE
otherwise
TRUE
TRUE
FALSE
FALSE
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
|
typedef enum { GST_RANK_NONE = 0, GST_RANK_MARGINAL = 64, GST_RANK_SECONDARY = 128, GST_RANK_PRIMARY = 256 } GstRank;
Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms) will choose this element over an alternative one with the same function.
The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256
(GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining
the rank of a GstPlugin using gst_plugin_feature_set_rank()
.
GST_RANK_NONE
GST_RANK_NONE
will be chosen last or not at all
will be chosen last or not at all
GST_RANK_MARGINAL
GST_RANK_MARGINAL
unlikly to be chosen
unlikly to be chosen
GST_RANK_SECONDARY
GST_RANK_SECONDARY
likely to be chosen
likely to be chosen
GST_RANK_PRIMARY
GST_RANK_PRIMARY
will be chosen first
will be chosen first
GST_RANK_NONE |
will be chosen last or not at all |
GST_RANK_MARGINAL |
unlikly to be chosen |
GST_RANK_SECONDARY |
likely to be chosen |
GST_RANK_PRIMARY |
will be chosen first |
gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature, GstTypeNameData *data);
Compares type and name of plugin feature. Can be used with gst_filter_run()
.
feature
:feature
the GstPluginFeature
the GstPluginFeature
GstPluginFeatureGstPluginFeaturedata
:data
the type and name to check against
the type and name to check against
Returns :Returns TRUE if equal.
TRUE if equal.
feature : |
the GstPluginFeature |
data : |
the type and name to check against |
Returns : | TRUE if equal. |
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
feature to rank
feature to rank
rank
:rank
rank value - higher number means more priority rank
rank value - higher number means more priority rank
feature : |
feature to rank |
rank : |
rank value - higher number means more priority rank |
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. A copy is made of the name so you should free the supplied name
after calling this function.
feature
:feature
a feature
a feature
name
:name
the name to set
the name to set
feature : |
a feature |
name : |
the name to set |
guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
Gets the rank of a plugin feature.
feature
:feature
a feature
a feature
Returns :Returns The rank of the feature
The rank of the feature
feature : |
a feature |
Returns : | The rank of the feature |
const gchar* gst_plugin_feature_get_name (GstPluginFeature *feature);
Gets the name of a plugin feature.
feature
:feature
a feature
a feature
Returns :Returns the name
the name
feature : |
a feature |
Returns : | the name |
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;
feature
:feature
the plugin feature to check
the plugin feature to check
Returns :Returns A reference to the loaded feature, or NULL on error.
A reference to the loaded feature, or NULL on error.
feature : |
the plugin feature to check |
Returns : | A reference to the loaded feature, or NULL on error. |
void gst_plugin_feature_list_free (GList *list);
Unrefs each member of list
, then frees the list.
list
:list
list of GstPluginFeature
list of GstPluginFeature
GstPluginFeatureGstPluginFeature
list : |
list of GstPluginFeature |
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
feature
:feature
a feature
a feature
min_major
:min_major
minimum required major version
minimum required major version
min_minor
:min_minor
minimum required minor version
minimum required minor version
min_micro
:min_micro
minimum required micro version
minimum required micro version
Returns :Returns TRUE if the plugin feature has at least
the required version, otherwise FALSE.
TRUE if the plugin feature has at least
the required version, otherwise FALSE.
TRUETRUEFALSEFALSE
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. |