From f0509d3738ec37cfa4afa81f070c8abd876e6561 Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Sat, 1 Dec 2018 12:01:17 +0100 Subject: drm: rename plane options to better, invariant, names This commit bumps the libmpv version to 1.102 drm-osd-plane -> drm-draw-plane drm-video-plane -> drm-drmprime-video-plane drm-osd-size -> drm-draw-surface-size "draw plane", as in the plane that OpenGL draws to, whether it be video + OSD or just OSD. "drmprime video plane", as in the plane used for hwdec video imported via drmprime. "draw surface size", as in the size of the surface used for the draw plane The new names are invariant whether or not hwdec_drmprime_drm is being used or not. The original naming was very confusing, as when doing regular rendering (swdec or vaapi) the video would be displayed on the "OSD plane", and the "Video plane" would remain unused. --- libmpv/client.h | 2 +- libmpv/render.h | 12 +++++++++--- libmpv/render_gl.h | 11 ++++++++--- 3 files changed, 18 insertions(+), 7 deletions(-) (limited to 'libmpv') diff --git a/libmpv/client.h b/libmpv/client.h index 488ccb332c..39df20a8c0 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -210,7 +210,7 @@ extern "C" { * relational operators (<, >, <=, >=). */ #define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL) -#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 101) +#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 102) /** * The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before diff --git a/libmpv/render.h b/libmpv/render.h index 253b2b43f9..304a21a932 100644 --- a/libmpv/render.h +++ b/libmpv/render.h @@ -283,13 +283,19 @@ typedef enum mpv_render_param_type { */ MPV_RENDER_PARAM_DRM_DISPLAY = 14, /** - * DRM osd size, contains osd dimensions. + * DRM draw surface size, contains draw surface dimensions. * Valid for mpv_render_context_create(). - * Type : struct mpv_opengl_drm_osd_size* + * Type : struct mpv_opengl_drm_draw_surface_size* */ - MPV_RENDER_PARAM_DRM_OSD_SIZE = 15, + MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE = 15, } mpv_render_param_type; +/** + * For backwards compatibility with the old naming of + * MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE + */ +#define MPV_RENDER_PARAM_DRM_OSD_SIZE MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE + /** * Used to pass arbitrary parameters to some mpv_render_* functions. The * meaning of the data parameter is determined by the type, and each diff --git a/libmpv/render_gl.h b/libmpv/render_gl.h index 4d771f2958..690b126906 100644 --- a/libmpv/render_gl.h +++ b/libmpv/render_gl.h @@ -177,12 +177,17 @@ typedef struct mpv_opengl_drm_params { int render_fd; } mpv_opengl_drm_params; -typedef struct mpv_opengl_drm_osd_size { +typedef struct mpv_opengl_drm_draw_surface_size { /** - * size of the OSD in pixels. + * size of the draw plane surface in pixels. */ int width, height; -} mpv_opengl_drm_osd_size; +} mpv_opengl_drm_draw_surface_size; + +/** + * For backwards compatibility with the old naming of mpv_opengl_drm_draw_surface_size + */ +#define mpv_opengl_drm_osd_size mpv_opengl_drm_draw_surface_size #ifdef __cplusplus } -- cgit v1.2.3