diff options
author | wm4 <wm4@nowhere> | 2016-09-12 15:08:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-12 19:58:58 +0200 |
commit | 274e71ee8b774d6c9c69929a548a83c343202be1 (patch) | |
tree | 1176b9933fb04d730e0eeec4bcb3bc024725d618 /libmpv/opengl_cb.h | |
parent | 343f5ca24beeddc69f49d43448acc05b982176ad (diff) | |
download | mpv-274e71ee8b774d6c9c69929a548a83c343202be1.tar.bz2 mpv-274e71ee8b774d6c9c69929a548a83c343202be1.tar.xz |
vo_opengl: add hw overlay support and use it for RPI
This overlay support specifically skips the OpenGL rendering chain, and
uses GL rendering only for OSD/subtitles. This is for devices which
don't have performant GL support.
hwdec_rpi.c contains code ported from vo_rpi.c. vo_rpi.c is going to be
deprecated. I left in the code for uploading sw surfaces (as it might
be slightly more efficient for rendering sw decoded video), although
it's dead code for now.
Diffstat (limited to 'libmpv/opengl_cb.h')
-rw-r--r-- | libmpv/opengl_cb.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libmpv/opengl_cb.h b/libmpv/opengl_cb.h index 8751ca01e0..6500b4ef65 100644 --- a/libmpv/opengl_cb.h +++ b/libmpv/opengl_cb.h @@ -190,6 +190,29 @@ extern "C" { * In previous libmpv releases, this used "GL_MP_D3D_interfaces" and * "glMPGetD3DInterface". This is deprecated; use glMPGetNativeDisplay instead * (the semantics are 100% compatible). + * + * Windowing system interop on RPI + * ------------------------------- + * + * The RPI uses no proper interop, but hardware overlays instead. To place the + * overlay correctly, you can communicate the window parameters as follows to + * libmpv. gl->MPGetNativeDisplay("MPV_RPI_WINDOW") return an array of type int + * with the following 4 elements: + * 0: display number (default 0) + * 1: layer number of the GL layer - video will be placed in the layer + * directly below (default: 0) + * 2: absolute x position of the GL context (default: 0) + * 3: absolute y position of the GL context (default: 0) + * The (x,y) position must be the absolute screen pixel position of the + * top/left pixel of the dispmanx layer used for the GL context. If you render + * to a FBO, the position must be that of the final position of the FBO + * contents on screen. You can't transform or scale the video other than what + * mpv will render to the video overlay. The defaults are suitable for + * rendering the video at fullscreen. + * The parameters are checked on every draw by calling MPGetNativeDisplay and + * checking the values in the returned array for changes. The returned array + * must remain valid until the libmpv render function returns; then it can be + * deallocated by the API user. */ /** |