From cd618f19b94bf659e108c3aa0daa4c7e61ec6a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 30 Sep 2020 10:47:45 +0200 Subject: [PATCH] va: simplify VPP detection Also the previous code failed if VPP was not present blacklisting the plugin. Part-of: --- sys/va/plugin.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/va/plugin.c b/sys/va/plugin.c index e594aa8112..1cc1bc60f0 100644 --- a/sys/va/plugin.c +++ b/sys/va/plugin.c @@ -221,21 +221,11 @@ plugin_register_elements (GstPlugin * plugin, GstVaDevice * device) _insert_profile_in_table (encoderslp, profiles[i]); else if (entrypoints[j] == VAEntrypointEncPicture) _insert_profile_in_table (encodersimg, profiles[i]); + else if (entrypoints[j] == VAEntrypointVideoProc) + has_vpp = TRUE; } } - status = vaQueryConfigEntrypoints (dpy, VAProfileNone, entrypoints, - &num_entrypoints); - if (status != VA_STATUS_SUCCESS) { - GST_ERROR ("vaQueryConfigEntrypoints: %s", vaErrorStr (status)); - goto bail; - } - - for (j = 0; j < num_entrypoints; j++) { - if ((has_vpp = (entrypoints[j] == VAEntrypointVideoProc))) - break; - } - plugin_register_decoders (plugin, device, decoders); plugin_register_encoders (plugin, device, encoders, VAEntrypointEncSlice); plugin_register_encoders (plugin, device, encoderslp, VAEntrypointEncSliceLP);