summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2023-05-16 15:32:56 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-05-16 08:37:48 +0000
commit3497bbb8a8bd1ef41b5d08d5be7a4b67eb7c4191 (patch)
tree56751b7d88008f7853da220e69568dfd9fc698fb
parent8e52e42444f45a103dcbdbbe7634162b9d0d4755 (diff)
downloadgstreamer-3497bbb8a8bd1ef41b5d08d5be7a4b67eb7c4191.tar.gz
va: No need to sort the device after registered
The va devices are already registered by the drm path order, so there is no need to sort them again after registered. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4643>
-rw-r--r--subprojects/gst-plugins-bad/sys/va/gstvadevice_linux.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/subprojects/gst-plugins-bad/sys/va/gstvadevice_linux.c b/subprojects/gst-plugins-bad/sys/va/gstvadevice_linux.c
index be080ba855..7d00db48c3 100644
--- a/subprojects/gst-plugins-bad/sys/va/gstvadevice_linux.c
+++ b/subprojects/gst-plugins-bad/sys/va/gstvadevice_linux.c
@@ -58,14 +58,6 @@ gst_va_device_new (GstVaDisplay * display, const gchar * render_device_path,
return device;
}
-static gint
-compare_device_path (gconstpointer a, gconstpointer b, gpointer user_data)
-{
- const GstVaDevice *pa = a, *pb = b;
-
- return g_strcmp0 (pa->render_device_path, pb->render_device_path);
-}
-
#ifdef HAVE_GUDEV
static gint
compare_udev_path (gconstpointer a, gconstpointer b)
@@ -110,10 +102,9 @@ gst_va_device_find_devices (void)
continue;
GST_INFO ("Found VA-API device: %s", path);
- g_queue_push_head (&devices, gst_va_device_new (dpy, path, i++));
+ g_queue_push_tail (&devices, gst_va_device_new (dpy, path, i++));
}
- g_queue_sort (&devices, compare_device_path, NULL);
g_list_free_full (udev_devices, g_object_unref);
g_object_unref (client);
@@ -137,10 +128,9 @@ gst_va_device_find_devices (void)
continue;
GST_INFO ("Found VA-API device: %s", path);
- g_queue_push_head (&devices, gst_va_device_new (dpy, path, j++));
+ g_queue_push_tail (&devices, gst_va_device_new (dpy, path, j++));
}
- g_queue_sort (&devices, compare_device_path, NULL);
return devices.head;
}
#endif