Er, plugins actually use gst_element_factory_set_rank(). Add a define to call gst_plugin_feature_set_rank().

Original commit message from CVS:
Er, plugins actually use gst_element_factory_set_rank().  Add a
define to call gst_plugin_feature_set_rank().
This commit is contained in:
David Schleef 2003-08-19 07:31:24 +00:00
parent b5f3c4eaf9
commit c4d186ec85
3 changed files with 23 additions and 0 deletions

View file

@ -411,6 +411,9 @@ GstElement* gst_element_factory_create (GstElementFactory *factory,
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name); GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name);
GstElement* gst_element_factory_make_or_warn (const gchar *factoryname, const gchar *name); GstElement* gst_element_factory_make_or_warn (const gchar *factoryname, const gchar *name);
#define gst_element_factory_set_rank(factory, rank) \
gst_plugin_feature_set_rank (GST_PLUGIN_FEATURE (factory), rank)
G_END_DECLS G_END_DECLS

View file

@ -136,3 +136,21 @@ gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) && return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) &&
(data->name == NULL || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature)))); (data->name == NULL || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature))));
} }
/**
* gst_plugin_feature_set_rank:
* @feature: feature to rank
* @rank: rank value - higher number means more priority rank
*
* Specifies a rank for a plugin feature, so that autoplugging uses
* the most appropriate feature.
*/
void
gst_plugin_feature_set_rank (GstPluginFeature *feature, guint16 rank)
{
g_return_if_fail (feature != NULL);
g_return_if_fail (GST_IS_PLUGIN_FEATURE (feature));
feature->rank = rank;
}

View file

@ -74,6 +74,8 @@ void gst_plugin_feature_unload_thyself (GstPluginFeature *feature);
gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature, gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
GstTypeNameData *data); GstTypeNameData *data);
void gst_plugin_feature_set_rank (GstPluginFeature *feature, guint16 rank);
G_END_DECLS G_END_DECLS