summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index d943d4ad78..33a2513c1f 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -106,6 +106,8 @@ enum mp_voctrl {
VOCTRL_GET_RECENT_FLIP_TIME, // int64_t* (using mp_time_us())
VOCTRL_GET_PREF_DEINT, // int*
+
+ VOCTRL_GET_VSYNC_TIMED, // bool*
};
// VOCTRL_SET_EQUALIZER
@@ -171,6 +173,11 @@ struct vo_extra {
struct mpv_opengl_cb_context *opengl_cb_context;
};
+struct frame_timing {
+ int64_t pts;
+ int64_t next_vsync;
+};
+
struct vo_driver {
// Encoding functionality, which can be invoked via --o only.
bool encode;
@@ -218,6 +225,12 @@ struct vo_driver {
*/
void (*draw_image)(struct vo *vo, struct mp_image *mpi);
+ /* Like draw image, but is called before every vsync with timing
+ * information
+ */
+ void (*draw_image_timed)(struct vo *vo, struct mp_image *mpi,
+ struct frame_timing *t);
+
/*
* Blit/Flip buffer to the screen. Must be called after each frame!
*/