summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-08 22:06:15 +0200
committerwm4 <wm4@nowhere>2015-10-08 22:06:15 +0200
commit6499224888c79eff236e97e0e63efa261d95d9b9 (patch)
treed24396dbc90ea639d6fa333ae24a38f687c57cbc /video
parent252d5b319a82ccea2062ece981287dad222b9b9b (diff)
downloadmpv-6499224888c79eff236e97e0e63efa261d95d9b9.tar.bz2
mpv-6499224888c79eff236e97e0e63efa261d95d9b9.tar.xz
vo: log deviation from ideal vsync interval
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 12083e4784..759fe92227 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -21,6 +21,7 @@
#include <assert.h>
#include <stdbool.h>
#include <pthread.h>
+#include <math.h>
#ifndef __MINGW32__
#include <unistd.h>
@@ -750,6 +751,10 @@ static bool render_frame(struct vo *vo)
if (in->current_frame && in->current_frame->display_synced &&
continuous && in->vsync_interval_approx > in->vsync_interval * 3 / 2)
in->missed_count += 1;
+
+ double diff = (in->vsync_interval - in->vsync_interval_approx) / 1e6;
+ if (fabs(diff) < 0.150)
+ MP_STATS(vo, "value %f vsync-diff", diff);
}
if (!in->dropped_frame) {