diff options
author | wm4 <wm4@nowhere> | 2013-12-22 15:48:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-22 15:49:02 +0100 |
commit | 895932aa0a33a71b49b4668b5bed884d0ebf39e4 (patch) | |
tree | 065d100f67350e6e18d0754e8caaa4e663417793 /video | |
parent | e6bea0ec5a5acfed719dfbd89a812a1aa31a9ac5 (diff) | |
download | mpv-895932aa0a33a71b49b4668b5bed884d0ebf39e4.tar.bz2 mpv-895932aa0a33a71b49b4668b5bed884d0ebf39e4.tar.xz |
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).
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_vdpau.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 9e92b29bc6..43e21209da 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -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); |