summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-01 01:07:21 +0100
committerwm4 <wm4@nowhere>2014-11-01 01:07:21 +0100
commitdab6cbca163910abf7bff93dec73b21d0a99b473 (patch)
treefdc0c4ea7c155775fffb2a75005ee2f9f1aa5faa /player
parent0e97808fc5ecfa252584d0d52abc69aab0bad4e5 (diff)
downloadmpv-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.
Diffstat (limited to 'player')
-rw-r--r--player/command.c2
-rw-r--r--player/core.h5
-rw-r--r--player/osd.c6
-rw-r--r--player/video.c4
4 files changed, 8 insertions, 9 deletions
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++;
}