From 085dfdea3246e4d0e984f9f3ccba2959df89842d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 20 Jan 2017 17:01:29 +0100 Subject: command: rename framedrop properties "drop-frame-count" -> "decoder-frame-drop-count" "vo-drop-frame-count" -> "frame-drop-count" This gets rid of the backwards "drop-frame" part in the name. Maybe calling the new property "frame-drops" would be better, but there are already a bunch of similar properties that end in "-count". --- DOCS/interface-changes.rst | 4 ++++ DOCS/man/input.rst | 8 ++++++-- player/command.c | 16 ++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 4e0c0d6f16..fa1ac13622 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -27,6 +27,10 @@ Interface changes ("") uses the value of --hwdec. - drop deprecated --ad/--vd features - drop deprecated --sub-codepage syntax + - rename properties: + - "drop-frame-count" to "decoder-frame-drop-count" + - "vo-drop-frame-count" to "frame-drop-count" + The old names still work, but are deprecated. --- mpv 0.23.0 --- - remove deprecated vf_vdpaurb (use "--hwdec=vdpau-copy" instead) - the following properties now have new semantics: diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 68f5ae53e8..dda049921d 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -940,15 +940,19 @@ Property list Total A-V sync correction done. Unavailable if audio or video is disabled. -``drop-frame-count`` +``decoder-frame-drop-count`` 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`` + ``drop-frame-count`` is a deprecated alias. + +``frame-drop-count`` Frames dropped by VO (when using ``--framedrop=vo``). + ``vo-drop-frame-count`` is a deprecated alias. + ``mistimed-frame-count`` Number of video frames that were not timed correctly in display-sync mode for the sake of keeping A/V sync. This does not include external diff --git a/player/command.c b/player/command.c index 7c3e269e9c..e837cf9ad3 100644 --- a/player/command.c +++ b/player/command.c @@ -650,7 +650,7 @@ static int mp_property_total_avsync_change(void *ctx, struct m_property *prop, return m_property_double_ro(action, arg, mpctx->total_avsync_change); } -static int mp_property_drop_frame_cnt(void *ctx, struct m_property *prop, +static int mp_property_frame_drop_dec(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; @@ -692,8 +692,8 @@ static int mp_property_vsync_ratio(void *ctx, struct m_property *prop, return m_property_double_ro(action, arg, vsyncs / (double)frames); } -static int mp_property_vo_drop_frame_count(void *ctx, struct m_property *prop, - int action, void *arg) +static int mp_property_frame_drop_vo(void *ctx, struct m_property *prop, + int action, void *arg) { MPContext *mpctx = ctx; if (!mpctx->vo_chain) @@ -3797,10 +3797,10 @@ static const struct m_property mp_properties_base[] = { {"duration", mp_property_duration}, {"avsync", mp_property_avsync}, {"total-avsync-change", mp_property_total_avsync_change}, - {"drop-frame-count", mp_property_drop_frame_cnt}, {"mistimed-frame-count", mp_property_mistimed_frame_count}, {"vsync-ratio", mp_property_vsync_ratio}, - {"vo-drop-frame-count", mp_property_vo_drop_frame_count}, + {"decoder-frame-drop-count", mp_property_frame_drop_dec}, + {"frame-drop-count", mp_property_frame_drop_vo}, {"vo-delayed-frame-count", mp_property_vo_delayed_frame_count}, {"percent-pos", mp_property_percent_pos}, {"time-start", mp_property_time_start}, @@ -3994,6 +3994,9 @@ static const struct m_property mp_properties_base[] = { M_PROPERTY_ALIAS("colormatrix-input-range", "video-params/colorlevels"), M_PROPERTY_ALIAS("colormatrix-primaries", "video-params/primaries"), M_PROPERTY_ALIAS("colormatrix-gamma", "video-params/gamma"), + + M_PROPERTY_DEPRECATED_ALIAS("drop-frame-count", "decoder-frame-drop-count"), + M_PROPERTY_DEPRECATED_ALIAS("vo-drop-frame-count", "frame-drop-count"), }; // Each entry describes which properties an event (possibly) changes. @@ -4015,7 +4018,8 @@ static const char *const *const mp_event_property_change[] = { "total-avsync-change", "audio-speed-correction", "video-speed-correction", "vo-delayed-frame-count", "mistimed-frame-count", "vsync-ratio", "estimated-display-fps", "vsync-jitter", "sub-text", "audio-bitrate", - "video-bitrate", "sub-bitrate"), + "video-bitrate", "sub-bitrate", "decoder-frame-drop-count", + "frame-drop-count"), E(MPV_EVENT_VIDEO_RECONFIG, "video-out-params", "video-params", "video-format", "video-codec", "video-bitrate", "dwidth", "dheight", "width", "height", "fps", "aspect", "vo-configured", "current-vo", -- cgit v1.2.3