[vlc-devel] [PATCH 4/4] gl: vaapi: use the X11 display pointer from the window
Thomas Guillem
thomas at gllm.fr
Wed Jun 21 10:21:04 CEST 2017
---
modules/video_output/opengl/converter_vaapi.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/modules/video_output/opengl/converter_vaapi.c b/modules/video_output/opengl/converter_vaapi.c
index 7c9f9947b6..9e0edc1510 100644
--- a/modules/video_output/opengl/converter_vaapi.c
+++ b/modules/video_output/opengl/converter_vaapi.c
@@ -38,14 +38,6 @@
#ifdef HAVE_VA_X11
# include <va/va_x11.h>
-/* TODO ugly way to get the X11 Display via EGL. */
-struct vlc_gl_sys_t
-{
- EGLDisplay display;
- EGLSurface surface;
- EGLContext context;
- Display *x11;
-};
#endif
struct priv
@@ -315,8 +307,10 @@ opengl_tex_converter_vaapi_init(video_format_t *fmt, opengl_tex_converter_t *tc)
#ifdef HAVE_VA_X11
case VOUT_WINDOW_TYPE_XID:
{
- struct vlc_gl_sys_t *glsys = tc->gl->sys;
- fshader = tc_vaegl_init(fmt, tc, priv, vaGetDisplay(glsys->x11));
+
+ Display *x11_dpy = tc->gl->surface->display.x11.dpy;
+ assert(x11_dpy != NULL);
+ fshader = tc_vaegl_init(fmt, tc, priv, vaGetDisplay(x11_dpy));
break;
}
#endif
--
2.11.0
More information about the vlc-devel
mailing list