va: Don't error out on plugin registration

Keep enumerate devices and don't return FALSE on plugin_init()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4149>
This commit is contained in:
Seungha Yang 2023-03-10 00:24:46 +09:00 committed by GStreamer Marge Bot
parent 2d6da02653
commit fe63034dd4

View file

@ -299,7 +299,7 @@ plugin_register_elements (GstPlugin * plugin, GstVaDevice * device)
status = vaQueryConfigProfiles (dpy, profiles, &num_profiles);
if (status != VA_STATUS_SUCCESS) {
GST_ERROR ("vaQueryConfigProfile: %s", vaErrorStr (status));
GST_WARNING ("vaQueryConfigProfile: %s", vaErrorStr (status));
goto bail;
}
@ -307,7 +307,7 @@ plugin_register_elements (GstPlugin * plugin, GstVaDevice * device)
status = vaQueryConfigEntrypoints (dpy, profiles[i], entrypoints,
&num_entrypoints);
if (status != VA_STATUS_SUCCESS) {
GST_ERROR ("vaQueryConfigEntrypoints: %s", vaErrorStr (status));
GST_WARNING ("vaQueryConfigEntrypoints: %s", vaErrorStr (status));
goto bail;
}
@ -350,22 +350,18 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
GList *devices, *dev;
gboolean ret = TRUE;
GST_DEBUG_CATEGORY_INIT (gstva_debug, "va", 0, "VA general debug");
plugin_add_dependencies (plugin);
devices = gst_va_device_find_devices ();
for (dev = devices; dev; dev = g_list_next (dev)) {
if (!plugin_register_elements (plugin, dev->data)) {
ret = FALSE;
break;
}
}
for (dev = devices; dev; dev = g_list_next (dev))
plugin_register_elements (plugin, dev->data);
gst_va_device_list_free (devices);
return ret;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,