Skip to content

Commit 3524572

Browse files
committed
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.
1 parent a865961 commit 3524572

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

DOCS/client-api-changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ API changes
3232

3333
::
3434

35+
--- mpv 0.40.0 ---
36+
2.5 - Deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT. no replacement.
3537
--- mpv 0.39.0 ---
3638
2.4 - mpv_render_param with the MPV_RENDER_PARAM_ICC_PROFILE argument no
3739
longer has incorrect assumptions about memory allocation and can be

libmpv/client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ extern "C" {
248248
* relational operators (<, >, <=, >=).
249249
*/
250250
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
251-
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 3)
251+
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 5)
252252

253253
/**
254254
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before

libmpv/render.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ typedef enum mpv_render_param_type {
225225
*/
226226
MPV_RENDER_PARAM_ICC_PROFILE = 6,
227227
/**
228+
* Deprecated
228229
* Ambient light in lux. Valid for mpv_render_context_set_parameter().
229230
* Type: int*
230231
* This can be used for automatic gamma correction.

video/out/gpu/libmpv_gpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ static int set_parameter(struct render_backend *ctx, mpv_render_param param)
111111
return 0;
112112
}
113113
case MPV_RENDER_PARAM_AMBIENT_LIGHT: {
114+
MP_WARN(ctx, "MPV_RENDER_PARAM_AMBIENT_LIGHT is deprecated and might be "
115+
"removed in the future (replacement: gamma-auto.lua)\n");
114116
int lux = *(int *)param.data;
115117
gl_video_set_ambient_lux(p->renderer, lux);
116118
return 0;

0 commit comments

Comments
 (0)