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.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 167c08a69c..51c7816920 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -140,6 +140,8 @@ struct voctrl_get_equalizer_args {
// VO does framedrop itself (vo_vdpau). Untimed/encoding VOs never drop.
#define VO_CAP_FRAMEDROP 2
+#define VO_MAX_FUTURE_FRAMES 10
+
struct vo;
struct osd_state;
struct mp_image;
@@ -153,9 +155,26 @@ struct vo_extra {
};
struct frame_timing {
+ // If > 0, realtime when frame should be shown, in mp_time_us() units.
int64_t pts;
+ // Realtime of estimated previous and next vsync events.
int64_t next_vsync;
int64_t prev_vsync;
+ // The current frame to be drawn. NULL means redraw previous frame
+ // (e.g. repeated frames).
+ // (Equivalent to the mp_image parameter of draw_image_timed, until the
+ // parameter is removed.)
+ struct mp_image *frame;
+ // List of future images, starting with the next one. This does not
+ // care about repeated frames - it simply contains the next real frames.
+ // vo_set_queue_params() sets how many frames this should include, though
+ // the actual number can be lower.
+ // future_frames[0] is the next frame.
+ // Note that this has frames only when a new real frame is pushed. Redraw
+ // calls or repeated frames do not include this.
+ // Ownership of the frames belongs to the caller.
+ int num_future_frames;
+ struct mp_image **future_frames;
};
struct vo_driver {
@@ -302,7 +321,7 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *p, int flags);
int vo_control(struct vo *vo, uint32_t request, void *data);
bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts);
-void vo_queue_frame(struct vo *vo, struct mp_image *image,
+void vo_queue_frame(struct vo *vo, struct mp_image **images,
int64_t pts_us, int64_t duration);
void vo_wait_frame(struct vo *vo);
bool vo_still_displaying(struct vo *vo);
@@ -318,8 +337,9 @@ void vo_query_formats(struct vo *vo, uint8_t *list);
void vo_event(struct vo *vo, int event);
int vo_query_and_reset_events(struct vo *vo, int events);
struct mp_image *vo_get_current_frame(struct vo *vo);
-
-void vo_set_flip_queue_params(struct vo *vo, int64_t offset_us, bool vsync_timed);
+void vo_set_queue_params(struct vo *vo, int64_t offset_us, bool vsync_timed,
+ int num_future_frames);
+int vo_get_num_future_frames(struct vo *vo);
int64_t vo_get_vsync_interval(struct vo *vo);
double vo_get_display_fps(struct vo *vo);