mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 06:11:10 +00:00
video: pass vsync offset to VO
For now, this is trivial (and actually redundant). The future display sync code will make better use of it. The main point is that the new internal API pretty much makes this transparent to the vo_opengl interpolation code.
This commit is contained in:
parent
41ad9d8924
commit
c5e3613bba
@ -716,6 +716,7 @@ static bool render_frame(struct vo *vo)
|
||||
.pts = pts,
|
||||
.next_vsync = next_vsync,
|
||||
.prev_vsync = prev_vsync,
|
||||
.vsync_offset = next_vsync - pts,
|
||||
.frame = img,
|
||||
.num_future_frames = num_future_frames,
|
||||
.future_frames = future_frames,
|
||||
|
@ -160,6 +160,8 @@ struct frame_timing {
|
||||
// Realtime of estimated previous and next vsync events.
|
||||
int64_t next_vsync;
|
||||
int64_t prev_vsync;
|
||||
// "ideal" display time within the vsync
|
||||
int64_t vsync_offset;
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user