mirror of
https://github.com/mpv-player/mpv
synced 2025-03-06 06:08:23 +00:00
vo_vdpau: add some debugging messages for frame timing
Note that this will print a difference even with perfect sync, because the code queues the frames _between_ vsync, probably for error margin (though I don't understand why it uses the exact values chosen).
This commit is contained in:
parent
e6bea0ec5a
commit
895932aa0a
@ -1020,10 +1020,12 @@ static int update_presentation_queue_status(struct vo *vo)
|
||||
break;
|
||||
if (vc->vsync_interval > 1) {
|
||||
uint64_t qtime = vc->queue_time[vc->query_surface_num];
|
||||
int diff = ((int64_t)vtime - (int64_t)qtime) / 1e6;
|
||||
MP_TRACE(vo, "Queue time difference: %d ms\n", diff);
|
||||
if (vtime < qtime + vc->vsync_interval / 2)
|
||||
MP_VERBOSE(vo, "Frame shown too early\n");
|
||||
MP_VERBOSE(vo, "Frame shown too early (%d ms)\n", diff);
|
||||
if (vtime > qtime + vc->vsync_interval)
|
||||
MP_VERBOSE(vo, "Frame shown late\n");
|
||||
MP_VERBOSE(vo, "Frame shown late (%d ms)\n", diff);
|
||||
}
|
||||
vc->query_surface_num = WRAP_ADD(vc->query_surface_num, 1,
|
||||
vc->num_output_surfaces);
|
||||
|
Loading…
Reference in New Issue
Block a user