diff options
Diffstat (limited to 'video/out/opengl/hwdec.h')
-rw-r--r-- | video/out/opengl/hwdec.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec.h b/video/out/opengl/hwdec.h index 29ccd18a42..ce59b67e58 100644 --- a/video/out/opengl/hwdec.h +++ b/video/out/opengl/hwdec.h @@ -16,6 +16,8 @@ struct gl_hwdec { void *priv; // For working around the vdpau vs. vaapi mess. bool probing; + // Used in overlay mode only. + float overlay_colorkey[4]; }; struct gl_hwdec_plane { @@ -53,6 +55,21 @@ struct gl_hwdec_driver { void (*unmap)(struct gl_hwdec *hw); void (*destroy)(struct gl_hwdec *hw); + + // The following functions provide an alternative API. Each gl_hwdec_driver + // must have either map_frame or overlay_frame set (not both or none), and + // if overlay_frame is set, it operates in overlay mode. In this mode, + // OSD etc. is rendered via OpenGL, but the video is rendered as a separate + // layer below it. + // Non-overlay mode is strictly preferred, so try not to use overlay mode. + + // Set the given frame as overlay, replacing the previous one. + // hw_image==NULL is passed to clear the overlay. + int (*overlay_frame)(struct gl_hwdec *hw, struct mp_image *hw_image); + + // Move overlay position within the "window". + void (*overlay_adjust)(struct gl_hwdec *hw, int w, int h, + struct mp_rect *src, struct mp_rect *dst); }; struct gl_hwdec *gl_hwdec_load_api(struct mp_log *log, GL *gl, |