1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

vo_gpu: hwdec_vaapi_gl: do not include eglext.h

Adding an ifdef mess to deal with insufficient system headers is kind of
a mess. It's easier to just provide the definitions manually. This sucks
a bit too, but it's the approach we've been using with OpenGL headers in
general, and I think that worked pretty well.
This commit is contained in:
wm4 2019-12-07 14:04:43 +01:00
parent 3cabd11f9b
commit 16b9c4c952

View File

@ -19,18 +19,12 @@
#include "hwdec_vaapi.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "video/out/opengl/ra_gl.h"
#ifndef GL_OES_EGL_image
typedef void* GLeglImageOES;
#endif
#ifndef EGL_KHR_image
typedef void *EGLImageKHR;
#endif
// Any EGL_EXT_image_dma_buf_import definitions used in this source file.
#ifndef EGL_LINUX_DMA_BUF_EXT
#define EGL_LINUX_DMA_BUF_EXT 0x3270
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
@ -42,14 +36,11 @@ typedef void *EGLImageKHR;
#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
#endif
// Any EGL_EXT_image_dma_buf_import definitions used in this source file.
#ifndef EGL_DMA_BUF_PLANE3_FD_EXT
#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
#endif
struct vaapi_gl_mapper_priv {
GLuint gl_textures[4];