vaapi: Disable Wayland if no libdrm

Platform wise, is not possible, as far as I known, to have Wayland
without kernel's DRM. Though, it's possible to configure
gstreamer-vaapi without DRM but Wayland support, with the enhanced
handling of dmabuf in vaapisink for Wayland, vaapisink will always
fail. Given both issues, configuration with no DRM but Wayland, makes
things more complex, and a simpler approach is to refuse that
configuration.

This patch disables Wayland support if there isn't DRM support. Also,
it disables the display test for Wayland, relying only on DRM and
X11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1606>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-01-30 09:38:48 +01:00 committed by GStreamer Marge Bot
parent 2fc4e928d6
commit a6a8a13608
2 changed files with 5 additions and 4 deletions

View file

@ -920,9 +920,6 @@ gst_vaapi_create_test_display (void)
#if USE_DRM
GST_VAAPI_DISPLAY_TYPE_DRM,
#endif
#if USE_WAYLAND
GST_VAAPI_DISPLAY_TYPE_WAYLAND,
#endif
#if USE_X11
GST_VAAPI_DISPLAY_TYPE_X11,
#endif

View file

@ -124,10 +124,14 @@ USE_AV1_DECODER = cc.has_header('va/va_dec_av1.h', dependencies: libva_dep, pref
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
USE_WAYLAND = libva_wayland_dep.found() and wayland_client_dep.found() and wayland_protocols_dep.found() and wayland_scanner_bin.found() and get_option('with_wayland') != 'no'
USE_WAYLAND = libva_wayland_dep.found() and wayland_client_dep.found() and wayland_protocols_dep.found() and wayland_scanner_bin.found() and get_option('with_wayland') != 'no' and USE_DRM
USE_X11 = libva_x11_dep.found() and x11_dep.found() and get_option('with_x11') != 'no'
USE_GLX = gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no' and USE_X11
if get_option('with_wayland') == 'yes' and not USE_DRM
error('DRM support is required to enable Wayland support')
endif
if not (USE_DRM or USE_X11 or USE_WAYLAND)
error('No renderer API found (it is requried either DRM, X11 and/or WAYLAND)')
endif