Commit c4d186ec authored by David Schleef's avatar David Schleef
Browse files

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

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().
parent b5f3c4ea
......@@ -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_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
......
......@@ -136,3 +136,21 @@ gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
return ((data->type == 0 || data->type == G_OBJECT_TYPE (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;
}
......@@ -74,6 +74,8 @@ 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, guint16 rank);
G_END_DECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment