mirror of https://github.com/mpv-player/mpv
player: update meaning of drop_frame_cnt
Rename the variable, update comments, and update the documentation of the property which returns its value.
This commit is contained in:
parent
0e97808fc5
commit
dab6cbca16
|
@ -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``).
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue