diff options
Diffstat (limited to 'libmpv')
-rw-r--r-- | libmpv/client.h | 2 | ||||
-rw-r--r-- | libmpv/mpv.def | 1 | ||||
-rw-r--r-- | libmpv/opengl_cb.h | 12 |
3 files changed, 14 insertions, 1 deletions
diff --git a/libmpv/client.h b/libmpv/client.h index 2ace0f54cf..511c4794b4 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -195,7 +195,7 @@ extern "C" { * relational operators (<, >, <=, >=). */ #define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL) -#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 15) +#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 16) /** * Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with. diff --git a/libmpv/mpv.def b/libmpv/mpv.def index d4d45874fa..4cdcf6b06b 100644 --- a/libmpv/mpv.def +++ b/libmpv/mpv.def @@ -23,6 +23,7 @@ mpv_initialize mpv_load_config_file mpv_observe_property mpv_opengl_cb_init_gl +mpv_opengl_cb_report_flip mpv_opengl_cb_render mpv_opengl_cb_set_update_callback mpv_opengl_cb_uninit_gl diff --git a/libmpv/opengl_cb.h b/libmpv/opengl_cb.h index 0e679e5edf..225f44fd50 100644 --- a/libmpv/opengl_cb.h +++ b/libmpv/opengl_cb.h @@ -199,6 +199,18 @@ int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts, int mpv_opengl_cb_render(mpv_opengl_cb_context *ctx, int fbo, int vp[4]); /** + * Tell the renderer that a frame was flipped at the given time. This is + * optional, but can help the player to achieve better timing. + * + * If this is called while no video or no OpenGL is initialized, it is ignored. + * + * @param time The mpv time (using mpv_get_time_us()) at which the flip call + * returned. If 0 is passed, mpv_get_time_us() is used instead. + * @return error code + */ +int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time); + +/** * Destroy the mpv OpenGL state. * * If video is still active (e.g. a file playing), video will be disabled |