From a062f115a1027c34c46633e1ea9f0a0951380cdd Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 28 Aug 2023 20:45:38 -0500 Subject: [PATCH] command: remove sub-forced-only-cur property Since we no longer have the auto choice, this is always exactly equal to the value of the option (sub-forced-events-only). Remove the property and alias it. --- DOCS/interface-changes.rst | 1 + DOCS/man/input.rst | 3 --- player/command.c | 10 +--------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 6b00329bc2..d5d350ee86 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -50,6 +50,7 @@ Interface changes - remove `auto` choice from `--sub-forced-only` - remove `auto-forced-only` property - rename `--sub-forced-only` to `--sub-forced-events-only` + - remove `sub-forced-only-cur` property (`--sub-forced-events-only` is a replacement) --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 07beb67717..d909066ace 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2720,9 +2720,6 @@ Property list ``secondary-sub-end`` Same as ``sub-end``, but for the secondary subtitles. -``sub-forced-only-cur`` - Read-only - whether the current subtitle track is being shown in forced-only mode. - ``playlist-pos`` (RW) Current position on playlist. The first entry is on position 0. Writing to this property may start playback at the new position. diff --git a/player/command.c b/player/command.c index 691f35c50e..200696b7af 100644 --- a/player/command.c +++ b/player/command.c @@ -3009,14 +3009,6 @@ static int mp_property_sub_end(void *ctx, struct m_property *prop, return m_property_double_ro(action, arg, end); } -static int mp_property_sub_forced_only_cur(void *ctx, struct m_property *prop, - int action, void *arg) -{ - MPContext *mpctx = ctx; - int ret = mpctx->opts->subs_rend->sub_forced_events_only; - return m_property_bool_ro(action, arg, ret); -} - static int mp_property_playlist_current_pos(void *ctx, struct m_property *prop, int action, void *arg) { @@ -3987,7 +3979,6 @@ static const struct m_property mp_properties_base[] = { .priv = (void *)&(const int){0}}, {"secondary-sub-end", mp_property_sub_end, .priv = (void *)&(const int){1}}, - {"sub-forced-only-cur", mp_property_sub_forced_only_cur}, {"vf", mp_property_vf}, {"af", mp_property_af}, @@ -4047,6 +4038,7 @@ static const struct m_property mp_properties_base[] = { M_PROPERTY_ALIAS("colormatrix-primaries", "video-params/primaries"), M_PROPERTY_ALIAS("colormatrix-gamma", "video-params/gamma"), + M_PROPERTY_DEPRECATED_ALIAS("sub-forced-only-cur", "sub-forced-events-only"), M_PROPERTY_DEPRECATED_ALIAS("drop-frame-count", "decoder-frame-drop-count"), M_PROPERTY_DEPRECATED_ALIAS("vo-drop-frame-count", "frame-drop-count"), };