1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

player: replace mistimed-frame-count with vsync-ratio on status line

I think this is much more informative. Maybe.
This commit is contained in:
wm4 2015-11-18 21:21:57 +01:00
parent 76fcef618b
commit 58caf577f1
2 changed files with 10 additions and 6 deletions

View File

@ -562,11 +562,13 @@ listed.
this will indicate a problem. (``total-avsync-change`` property.)
- Encoding state in ``{...}``, only shown in encoding mode.
- Display sync state. If display sync is active (``display-sync-active``
property), this shows ``DS: 12/13``, where the first number is the number of
frames where a vsync was intentionally added or removed
(``mistimed-frame-count``), and the second number of estimated number of vsyncs
which took too long (``vo-delayed-frame-count`` property). The latter is a
heuristic, as it's generally not possible to determine this with certainty.
property), this shows ``DS: 2.500/13``, where the first number is average
number of vsyncs per video frame (e.g. 2.5 when playing 24Hz videos on 60Hz
screens), which might jitter if the ratio doesn't round off, or there are
mistimed frames (``vsync-ratio``), and the second number of estimated number
of vsyncs which took too long (``vo-delayed-frame-count`` property). The
latter is a heuristic, as it's generally not possible to determine this with
certainty.
- Dropped frames, e.g. ``Dropped: 4``. Shows up only if the count is not 0. Can
grow if the video framerate is higher than that of the display, or if video
rendering is too slow. Also can be incremented on "hiccups" and when the video

View File

@ -235,8 +235,10 @@ static void print_status(struct MPContext *mpctx)
// VO stats
if (mpctx->d_video) {
if (mpctx->display_sync_active) {
saddf(&line, " DS: %d/%"PRId64, mpctx->mistimed_frames_total,
char *r = mp_property_expand_string(mpctx, "${vsync-ratio}");
saddf(&line, " DS: %s/%"PRId64, r,
vo_get_delayed_count(mpctx->video_out));
talloc_free(r);
}
int64_t c = vo_get_drop_count(mpctx->video_out);
if (c > 0 || mpctx->dropped_frames_total > 0) {