diff options
author | wm4 <wm4@nowhere> | 2015-04-09 19:30:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-09 19:30:26 +0200 |
commit | 8dc7156bc0271965ea1e6768cfc7bbe67cef1876 (patch) | |
tree | 3573cd6130ff7b71bf0c4d7f66e4f9ae53200b75 /libmpv/opengl_cb.h | |
parent | 4e8ee522f4df73a74befc093640fdf60a43053ec (diff) | |
download | mpv-8dc7156bc0271965ea1e6768cfc7bbe67cef1876.tar.bz2 mpv-8dc7156bc0271965ea1e6768cfc7bbe67cef1876.tar.xz |
vo_opengl_cb: add a function to report vsync time
And also let vo.c know of it.
Currently, this does not help much, but will facilitate future
improvements.
Diffstat (limited to 'libmpv/opengl_cb.h')
-rw-r--r-- | libmpv/opengl_cb.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |