| GStreamer 0.11 Core Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <gst/gst.h> struct GstPluginFeature; 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); #define gst_plugin_feature_set_name (feature, name) guint gst_plugin_feature_get_rank (GstPluginFeature *feature); #define gst_plugin_feature_get_name (feature) GstPluginFeature * gst_plugin_feature_load (GstPluginFeature *feature); GList * gst_plugin_feature_list_copy (GList *list); void gst_plugin_feature_list_free (GList *list); #define GST_PLUGIN_FEATURE_LIST_DEBUG (list) gboolean gst_plugin_feature_check_version (GstPluginFeature *feature,guint min_major,guint min_minor,guint min_micro); gint gst_plugin_feature_rank_compare_func (gconstpointer p1,gconstpointer p2);
GObject +----GInitiallyUnowned +----GstObject +----GstPluginFeature +----GstElementFactory +----GstTypeFindFactory +----GstIndexFactory
typedef struct {
const gchar *name;
GType type;
} GstTypeNameData;
Structure used for filtering based on name and type.
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.
|
the pluginfeature to check |
|
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, 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.
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().
|
the GstPluginFeature |
|
the type and name to check against. [in] |
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 to rank |
|
rank value - higher number means more priority rank |
#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.
|
a GstPluginFeature to set the name of. |
|
the new name |
guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
Gets the rank of a plugin feature.
|
a feature |
Returns : |
The rank of the feature |
#define gst_plugin_feature_get_name(feature) gst_object_get_name(GST_OBJECT_CAST(feature))
Returns a copy of the name of feature.
Caller should g_free() the return value after usage.
For a nameless plugin feature, this returns NULL, which you can safely g_free()
as well.
|
a GstPluginFeature to get the name of feature. |
Returns : |
the name of feature. g_free() after usage. MT safe. [transfer full]
|
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;
|
the plugin feature to check. [transfer none] |
Returns : |
a reference to the loaded feature, or NULL on error. [transfer full] |
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.
|
list of GstPluginFeature. [transfer none][element-type Gst.PluginFeature] |
Returns : |
a copy of list,
with each feature's reference count incremented. [transfer full][element-type Gst.PluginFeature]
|
Since 0.10.26
void gst_plugin_feature_list_free (GList *list);
Unrefs each member of list, then frees the list.
|
list of GstPluginFeature. [transfer full][element-type Gst.PluginFeature] |
#define GST_PLUGIN_FEATURE_LIST_DEBUG(list) gst_plugin_feature_list_debug(list)
Debug the plugin feature names in list.
|
a GList of plugin features. [transfer none][element-type Gst.PluginFeature] |
Since 0.10.31
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
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.
|
a GstPluginFeature |
|
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 after the name of p1 |
Since 0.10.31