From 0e9cfa6b642266af66cba59a259e0edef44d60f0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Sep 2015 00:18:05 +0200 Subject: vo_opengl: add mechanism to retrieve Display from EGL context The VAAPI EGL interop code will need access to the X11 Display. While GLX could return it from the current GLX context, EGL has no such mechanism. (At least no standard one supported by all implementations.) So mpv makes up such a mechanism. For internal purposes, this is very rather awkward solution, but it's needed for libmpv anyway. --- libmpv/opengl_cb.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libmpv') diff --git a/libmpv/opengl_cb.h b/libmpv/opengl_cb.h index bd694b61d4..112f254a59 100644 --- a/libmpv/opengl_cb.h +++ b/libmpv/opengl_cb.h @@ -126,6 +126,16 @@ extern "C" { * up until mpv_opengl_cb_uninit_gl() is called. If the name is not anything * you know/expected, return NULL from the function. * + * Windowing system interop on Linux + * --------------------------------- + * + * The new VAAPI OpenGL interop requires an EGL context. EGL provides no way + * to query the X11 Display associated to a specific EGL context, so this API + * is used to pass it through. + * + * glMPGetNativeDisplay("x11") should return a X11 "Display*", which then will + * be used to create the hardware decoder state. (On GLX, this is not needed.) + * * Windowing system interop on MS win32 * ------------------------------------ * -- cgit v1.2.3