summaryrefslogtreecommitdiffstats
path: root/libmpv
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-25 00:18:05 +0200
committerwm4 <wm4@nowhere>2015-09-25 00:20:11 +0200
commit0e9cfa6b642266af66cba59a259e0edef44d60f0 (patch)
tree66ad0a2d4805efa78eb9534d0fe308718a38edc8 /libmpv
parentd47dff3faa246256d9e29daa215db4b5aedcb3f2 (diff)
downloadmpv-0e9cfa6b642266af66cba59a259e0edef44d60f0.tar.bz2
mpv-0e9cfa6b642266af66cba59a259e0edef44d60f0.tar.xz
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.
Diffstat (limited to 'libmpv')
-rw-r--r--libmpv/opengl_cb.h10
1 files changed, 10 insertions, 0 deletions
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
* ------------------------------------
*