summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-25 00:20:57 +0200
committerwm4 <wm4@nowhere>2015-09-25 00:26:19 +0200
commit8d8a2045bde250a50228df7fa8f24124ec5b0251 (patch)
tree2ac12b399b6cb84db51204cffb6baafa1352154b /TOOLS
parent0e9cfa6b642266af66cba59a259e0edef44d60f0 (diff)
downloadmpv-8d8a2045bde250a50228df7fa8f24124ec5b0251.tar.bz2
mpv-8d8a2045bde250a50228df7fa8f24124ec5b0251.tar.xz
vo_opengl: support new VAAPI EGL interop
Should work much better than the old GLX interop code. Requires Mesa 11, and explicitly selecting the X11 EGL backend with: --vo=opengl:backend=x11egl Should it turn out that the new interop works well, we will try to autodetect EGL by default. This code still uses some bad assumptions, like expecting surfaces to be in NV12. (This is probably ok, because virtually all HW will use this format. But we should at least check this on init or so, instead of failing to render an image if our assumption doesn't hold up.) This repo was a lot of help: https://github.com/gbeauchesne/ffvademo The kodi code was also helpful (the magic FourCC it uses for EGL_LINUX_DRM_FOURCC_EXT are nowhere documented, and EGL_IMAGE_INTERNAL_FORMAT_EXT as used in ffvademo does not actually exist). (This is the 3rd VAAPI GL interop that was implemented in this player.)
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/old-configure4
-rw-r--r--TOOLS/old-makefile1
2 files changed, 5 insertions, 0 deletions
diff --git a/TOOLS/old-configure b/TOOLS/old-configure
index ac9f1e773d..f68f95f3aa 100755
--- a/TOOLS/old-configure
+++ b/TOOLS/old-configure
@@ -704,6 +704,10 @@ _vaapi_glx=no
(test "$_gl_x11" = yes && test "$_vaapi" = yes) && _vaapi_glx=auto
check_pkg_config "VAAPI with OpenGL/X11" $_vaapi_glx VAAPI_GLX 'libva-glx >= 0.32.0'
+_vaapi_x_egl=no
+(test "$_gl_x11_egl" = yes && test "$_vaapi" = yes) && _vaapi_x_egl=yes
+check_yes_no $_vaapi_x_egl VAAPI_X_EGL
+
check_pkg_config "SDL 2.0" $_sdl2 SDL2 'sdl2'
check_statement_libs "OSS Audio" $_ossaudio OSS_AUDIO $_soundcard_header "int x = SNDCTL_DSP_SETFRAGMENT;"
diff --git a/TOOLS/old-makefile b/TOOLS/old-makefile
index 107495b49d..1ed6bc4b3f 100644
--- a/TOOLS/old-makefile
+++ b/TOOLS/old-makefile
@@ -91,6 +91,7 @@ SOURCES-$(VAAPI) += video/out/vo_vaapi.c \
video/vaapi.c
SOURCES-$(VAAPI_VPP) += video/filter/vf_vavpp.c
SOURCES-$(VAAPI_GLX) += video/out/opengl/hwdec_vaglx.c
+SOURCES-$(VAAPI_X_EGL) += video/out/opengl/hwdec_vaegl.c
SOURCES-$(XV) += video/out/x11_common.c video/out/vo_xv.c
SOURCES-$(WAYLAND) += video/out/vo_wayland.c \