1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

player: change framedrop display in the status line

Hopefully less confusing, and hopefully doesn't exceed the terminal
width in any situation.
This commit is contained in:
wm4 2014-10-31 01:01:58 +01:00
parent 6ddd2b8e03
commit b17585e636
2 changed files with 14 additions and 12 deletions

View File

@ -445,14 +445,15 @@ listed.
if there is audio "missing", or not enough frames can be dropped. Usually
this will indicate a problem. (``total-avsync-change`` property.)
- Encoding state in ``{...}``, only shown in encoding mode.
- Decoder-dropped video frames, e.g. ``SD: 2``. Shows up only if the count is
not 0. Normally should never show up, unless ``--framedrop`` is set to enable
this mode, and your CPU is too slow. (``drop-frame-count`` property.)
- VO-dropped video frames, e.g. ``D: 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 frame couldn't be displayed on time. (``vo-drop-frame-count``
property.)
- 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
frame couldn't be displayed on time. (``vo-drop-frame-count`` property.)
If the decoder drops frames, the number of decoder-dropped frames is appended
to the display as well, e.g.: ``Dropped: 4/34``. This should almost never
happen, unless decoder-framedropping is enabled with one of the
``--framedrop`` options, the stream contains errors, or a weird codec is in
use. (``drop-frame-count`` property.)
- Cache state, e.g. ``Cache: 2s+134KB``. Visible if the stream cache is enabled.
The first value shows the amount of video buffered in the demuxer in seconds,
the second value shows *additional* data buffered in the stream cache in

View File

@ -229,11 +229,12 @@ static void print_status(struct MPContext *mpctx)
{
// VO stats
if (mpctx->d_video) {
if (mpctx->drop_frame_cnt)
saddf(&line, " SD: %d", mpctx->drop_frame_cnt);
int64_t c = vo_get_drop_count(mpctx->video_out);
if (c > 0)
saddf(&line, " D: %"PRId64, c);
if (c > 0 || mpctx->drop_frame_cnt > 0) {
saddf(&line, " Dropped: %"PRId64, c);
if (mpctx->drop_frame_cnt)
saddf(&line, "/%d", mpctx->drop_frame_cnt);
}
}
}