mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
playback: Avoid expensive API calls in tight loop.
We know we're dealing with GstPluginFeature.
This commit is contained in:
parent
d086c05c1f
commit
b9053c5ae8
1 changed files with 2 additions and 6 deletions
|
@ -31,20 +31,16 @@ static gint
|
||||||
compare_ranks (GValue * v1, GValue * v2)
|
compare_ranks (GValue * v1, GValue * v2)
|
||||||
{
|
{
|
||||||
gint diff;
|
gint diff;
|
||||||
const gchar *rname1, *rname2;
|
|
||||||
GstPluginFeature *f1, *f2;
|
GstPluginFeature *f1, *f2;
|
||||||
|
|
||||||
f1 = g_value_get_object (v1);
|
f1 = g_value_get_object (v1);
|
||||||
f2 = g_value_get_object (v2);
|
f2 = g_value_get_object (v2);
|
||||||
|
|
||||||
diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
|
diff = f2->rank - f1->rank;
|
||||||
if (diff != 0)
|
if (diff != 0)
|
||||||
return diff;
|
return diff;
|
||||||
|
|
||||||
rname1 = gst_plugin_feature_get_name (f1);
|
diff = strcmp (f1->name, f2->name);
|
||||||
rname2 = gst_plugin_feature_get_name (f2);
|
|
||||||
|
|
||||||
diff = strcmp (rname2, rname1);
|
|
||||||
|
|
||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue