diff options
author | wm4 <wm4@nowhere> | 2015-09-27 21:24:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-27 21:38:45 +0200 |
commit | 8aa8417aa35fd30990a1695380f22179848c6463 (patch) | |
tree | b261790ecaa06c6561721a07eb8c16957194f01a /video/out/opengl/hwdec_vaegl.c | |
parent | 1fa674c109c05e082bf0fb43be064cbdabea3327 (diff) | |
download | mpv-8aa8417aa35fd30990a1695380f22179848c6463.tar.bz2 mpv-8aa8417aa35fd30990a1695380f22179848c6463.tar.xz |
vo_opengl: vaapi: add Wayland support
Pretty trivial with the new EGL interop.
Fixes #478.
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; } |