1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-05 14:42:24 +00:00

libmpv: deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT render parameter

the equivalent options have been deprecated since mpv 0.35 in ac39661
and 2207236.

also bumping the MPV_CLIENT_API_VERSION to 2.5, since 2.4 was forgotten
in 6f619d5.
This commit is contained in:
der richter 2024-12-07 19:12:32 +01:00
parent e785296a1c
commit d82701962f
4 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,8 @@ API changes
::
--- mpv 0.40.0 ---
2.5 - Deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT. no replacement.
--- mpv 0.39.0 ---
2.4 - mpv_render_param with the MPV_RENDER_PARAM_ICC_PROFILE argument no
longer has incorrect assumptions about memory allocation and can be

View File

@ -248,7 +248,7 @@ extern "C" {
* relational operators (<, >, <=, >=).
*/
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 3)
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 5)
/**
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before

View File

@ -225,6 +225,7 @@ typedef enum mpv_render_param_type {
*/
MPV_RENDER_PARAM_ICC_PROFILE = 6,
/**
* Deprecated
* Ambient light in lux. Valid for mpv_render_context_set_parameter().
* Type: int*
* This can be used for automatic gamma correction.

View File

@ -111,6 +111,8 @@ static int set_parameter(struct render_backend *ctx, mpv_render_param param)
return 0;
}
case MPV_RENDER_PARAM_AMBIENT_LIGHT: {
MP_WARN(ctx, "MPV_RENDER_PARAM_AMBIENT_LIGHT is deprecated and might be "
"removed in the future (replacement: gamma-auto.lua)\n");
int lux = *(int *)param.data;
gl_video_set_ambient_lux(p->renderer, (double)lux);
return 0;