mirror of https://github.com/mpv-player/mpv
client API: deprecate tick event
This is conceptually outdated and should not exist. This affects Lua scripting and JSON IPC too.
This commit is contained in:
parent
b670838b3d
commit
0eabc6614a
|
@ -33,6 +33,7 @@ API changes
|
|||
::
|
||||
|
||||
--- mpv 0.30.0 ---
|
||||
1.107 - Deprecate MPV_EVENT_TICK
|
||||
1.106 - Add cancel_fn to mpv_stream_cb_info
|
||||
1.105 - Fix deadlock problems with MPV_RENDER_PARAM_ADVANCED_CONTROL and if
|
||||
the "vd-lavc-dr" option is enabled (which it is by default).
|
||||
|
|
|
@ -227,7 +227,7 @@ extern "C" {
|
|||
* relational operators (<, >, <=, >=).
|
||||
*/
|
||||
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
|
||||
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 106)
|
||||
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 107)
|
||||
|
||||
/**
|
||||
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before
|
||||
|
@ -1356,15 +1356,16 @@ typedef enum mpv_event_id {
|
|||
* removed in the far future.
|
||||
*/
|
||||
MPV_EVENT_UNPAUSE = 13,
|
||||
#endif
|
||||
/**
|
||||
* Sent every time after a video frame is displayed. Note that currently,
|
||||
* this will be sent in lower frequency if there is no video, or playback
|
||||
* is paused - but that will be removed in the future, and it will be
|
||||
* restricted to video frames only.
|
||||
*
|
||||
* @deprecated Use mpv_observe_property() with relevant properties instead
|
||||
* (such as "playback-time").
|
||||
*/
|
||||
MPV_EVENT_TICK = 14,
|
||||
#if MPV_ENABLE_DEPRECATED
|
||||
/**
|
||||
* @deprecated This was used internally with the internal "script_dispatch"
|
||||
* command to dispatch keyboard and mouse input for the OSC.
|
||||
|
|
|
@ -840,6 +840,8 @@ int mpv_request_event(mpv_handle *ctx, mpv_event_id event, int enable)
|
|||
pthread_mutex_lock(&ctx->lock);
|
||||
uint64_t bit = 1ULL << event;
|
||||
ctx->event_mask = enable ? ctx->event_mask | bit : ctx->event_mask & ~bit;
|
||||
if (enable && event == MPV_EVENT_TICK)
|
||||
MP_WARN(ctx, "The 'tick' event is deprecated and will be removed.\n");
|
||||
pthread_mutex_unlock(&ctx->lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue