playbin: use _plugin_feature_rank_compare API instead of duplicating the code.
This commit is contained in:
parent
8cf6049643
commit
9c94a1812f
@ -1293,7 +1293,6 @@ static gint
|
|||||||
compare_factories_func (gconstpointer p1, gconstpointer p2)
|
compare_factories_func (gconstpointer p1, gconstpointer p2)
|
||||||
{
|
{
|
||||||
GstPluginFeature *f1, *f2;
|
GstPluginFeature *f1, *f2;
|
||||||
gint diff;
|
|
||||||
gboolean is_sink1, is_sink2;
|
gboolean is_sink1, is_sink2;
|
||||||
gboolean is_parser1, is_parser2;
|
gboolean is_parser1, is_parser2;
|
||||||
|
|
||||||
@ -1325,13 +1324,7 @@ compare_factories_func (gconstpointer p1, gconstpointer p2)
|
|||||||
|
|
||||||
/* And if it's a both a parser or sink we first sort by rank
|
/* And if it's a both a parser or sink we first sort by rank
|
||||||
* and then by factory name */
|
* and then by factory name */
|
||||||
diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
|
return gst_plugin_feature_rank_compare_func (p1, p2);
|
||||||
if (diff != 0)
|
|
||||||
return diff;
|
|
||||||
|
|
||||||
diff = strcmp (GST_OBJECT_NAME (f1), GST_OBJECT_NAME (f2));
|
|
||||||
|
|
||||||
return diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must be called with elements lock! */
|
/* Must be called with elements lock! */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user