Skip to content

Commit

Permalink
libmpv: deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT render parameter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Akemi committed Nov 23, 2024
1 parent 7c1db5b commit 9fbb6cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DOCS/client-api-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions libmpv/render.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions video/out/gpu/libmpv_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ 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 (no replacement)\n");
int lux = *(int *)param.data;
gl_video_set_ambient_lux(p->renderer, lux);
return 0;
Expand Down

0 comments on commit 9fbb6cd

Please sign in to comment.