diff options
author | wm4 <wm4@nowhere> | 2014-11-01 01:07:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-01 01:07:21 +0100 |
commit | dab6cbca163910abf7bff93dec73b21d0a99b473 (patch) | |
tree | fdc0c4ea7c155775fffb2a75005ee2f9f1aa5faa | |
parent | 0e97808fc5ecfa252584d0d52abc69aab0bad4e5 (diff) | |
download | mpv-dab6cbca163910abf7bff93dec73b21d0a99b473.tar.bz2 mpv-dab6cbca163910abf7bff93dec73b21d0a99b473.tar.xz |
player: update meaning of drop_frame_cnt
Rename the variable, update comments, and update the documentation of
the property which returns its value.
-rw-r--r-- | DOCS/man/input.rst | 7 | ||||
-rw-r--r-- | player/command.c | 2 | ||||
-rw-r--r-- | player/core.h | 5 | ||||
-rw-r--r-- | player/osd.c | 6 | ||||
-rw-r--r-- | player/video.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index df4bf94566..9c768a5c1e 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -688,9 +688,10 @@ Property list disabled. ``drop-frame-count`` - Frames dropped because they arrived too late. Doesn't necessarily indicate - actual frame-drops, just the number of times the decoder was asked to drop. - Unavailable if video is disabled + Video frames dropped by decoder, because video is too far behind audio (when + using ``--framedrop=decoder``). Sometimes, this may be incremented in other + situations, e.g. when video packets are damaged, or the decoder doesn't + follow the usual rules. Unavailable if video is disabled. ``vo-drop-frame-count`` Frames dropped by VO (when using ``--framedrop=vo``). diff --git a/player/command.c b/player/command.c index 2cf91cfd68..dbe81bff15 100644 --- a/player/command.c +++ b/player/command.c @@ -524,7 +524,7 @@ static int mp_property_drop_frame_cnt(void *ctx, struct m_property *prop, if (!mpctx->d_video) return M_PROPERTY_UNAVAILABLE; - return m_property_int_ro(action, arg, mpctx->drop_frame_cnt); + return m_property_int_ro(action, arg, mpctx->dropped_frames_total); } static int mp_property_vo_drop_frame_count(void *ctx, struct m_property *prop, diff --git a/player/core.h b/player/core.h index de21757cb1..445c0c7105 100644 --- a/player/core.h +++ b/player/core.h @@ -246,9 +246,8 @@ typedef struct MPContext { // How much video timing has been changed to make it match the audio // timeline. Used for status line information only. double total_avsync_change; - // Total number of dropped frames that were "approved" to be dropped. - // Actual dropping depends on --framedrop and decoder internals. - int drop_frame_cnt; + // Total number of dropped frames that were dropped by decoder. + int dropped_frames_total; // Number of frames dropped in a row. int dropped_frames; // A-V sync difference when last frame was displayed. Kept to display diff --git a/player/osd.c b/player/osd.c index 2c6863eec8..d5c0ecc8ff 100644 --- a/player/osd.c +++ b/player/osd.c @@ -230,10 +230,10 @@ static void print_status(struct MPContext *mpctx) // VO stats if (mpctx->d_video) { int64_t c = vo_get_drop_count(mpctx->video_out); - if (c > 0 || mpctx->drop_frame_cnt > 0) { + if (c > 0 || mpctx->dropped_frames_total > 0) { saddf(&line, " Dropped: %"PRId64, c); - if (mpctx->drop_frame_cnt) - saddf(&line, "/%d", mpctx->drop_frame_cnt); + if (mpctx->dropped_frames_total) + saddf(&line, "/%d", mpctx->dropped_frames_total); } } } diff --git a/player/video.c b/player/video.c index 092975d776..0a5fe521e8 100644 --- a/player/video.c +++ b/player/video.c @@ -223,7 +223,7 @@ void reset_video_state(struct MPContext *mpctx) mpctx->video_pts = MP_NOPTS_VALUE; mpctx->video_next_pts = MP_NOPTS_VALUE; mpctx->total_avsync_change = 0; - mpctx->drop_frame_cnt = 0; + mpctx->dropped_frames_total = 0; mpctx->dropped_frames = 0; mpctx->drop_message_shown = 0; @@ -400,7 +400,7 @@ static int decode_image(struct MPContext *mpctx) if (had_packet && !d_video->waiting_decoded_mpi && mpctx->video_status == STATUS_PLAYING) { - mpctx->drop_frame_cnt++; + mpctx->dropped_frames_total++; mpctx->dropped_frames++; } |