summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2022-01-30 09:38:48 +0100
committerTim-Philipp Müller <tim@centricular.com>2022-02-01 16:27:21 +0000
commit2765e5fd2fd02132d4730f674f2af70b98452435 (patch)
treec04914574c2cfa1319c57735d8c10294f2bbdb9f
parent106cab2304ab932d963a1d5ed2b1e72b26b29b2c (diff)
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-vaapi/-/merge_requests/441>
-rw-r--r--gst/vaapi/gstvaapipluginutil.c3
-rw-r--r--meson.build6
2 files changed, 5 insertions, 4 deletions
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c
index b98f305f..0c47b75a 100644
--- a/gst/vaapi/gstvaapipluginutil.c
+++ b/gst/vaapi/gstvaapipluginutil.c
@@ -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
diff --git a/meson.build b/meson.build
index 4c8f22a6..a67ae7cb 100644
--- a/meson.build
+++ b/meson.build
@@ -118,10 +118,14 @@ USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies
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