diff options
Diffstat (limited to 'video/out/opengl/hwdec_vaegl.c')
-rw-r--r-- | video/out/opengl/hwdec_vaegl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index 90c7478d94..580e014423 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -56,6 +56,16 @@ static VADisplay *create_x11_va_display(GL *gl) } #endif +#if HAVE_VAAPI_WAYLAND +#include <va/va_wayland.h> + +static VADisplay *create_wayland_va_display(GL *gl) +{ + struct wl_display *wl = gl->MPGetNativeDisplay("wl"); + return wl ? vaGetDisplayWl(wl) : NULL; +} +#endif + static VADisplay *create_native_va_display(GL *gl) { if (!gl->MPGetNativeDisplay) @@ -66,6 +76,11 @@ static VADisplay *create_native_va_display(GL *gl) if (display) return display; #endif +#if HAVE_VAAPI_WAYLAND + display = create_wayland_va_display(gl); + if (display) + return display; +#endif return display; } |