va: simplify VPP detection

Also the previous code failed if VPP was not present blacklisting the
plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1619>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-09-30 10:47:45 +02:00
parent df49114275
commit cd618f19b9

View file

@ -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);