options: remove ancient option fallbacks/deprecation

We've got an ungodly amount of OPT_REPLACED and OPT_REMOVED sitting
around in the code. This is harmless, but the vast majority of these are
ancient. 26f4f18c06 is the last commit
that touched the majority of these and of course that only changed how
options were declared so all of this stuff was deprecated even before
that. No use in keeping these, so just delete them all. As an aside,
there was actually a cocoa_opts but it had only a single option which
was replaced by something else and empty otherwise. So that entire thing
was just simply removed. OPT_REPLACED/OPT_REMOVED declarations that were
added in 0.35 or later were kept as is.
This commit is contained in:
Dudemanguy 2023-09-19 19:56:00 -05:00
parent 96a6c1ae91
commit 969c19c9cb
17 changed files with 5 additions and 218 deletions

View File

@ -74,6 +74,8 @@ Interface changes
- update defaults to `--deband-threshold=48`, `--deband-grain=32`
- add `--directory-mode=auto` and make it the default
- remove deprecated `--profile=opengl-hq`
- remove several legacy fallbacks for old deprecated options (now they will just
error out like normal)
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.

View File

@ -1190,9 +1190,6 @@ Video
Set this option only if you have reason to believe the automatically
determined value is wrong.
``--display-fps=<fps>``
Deprecated alias for ``--override-display-fps``.
``--hwdec=<api1,api2,...|no|auto|auto-safe|auto-copy>``
Specify the hardware video decoding API that should be used if possible.
Whether hardware decoding is actually done depends on the video codec. If
@ -1438,10 +1435,6 @@ Video
Runtime changes to this are ignored (the current option value is used
whenever the renderer is created).
The old aliases ``--opengl-hwdec-interop`` and ``--hwdec-preload`` are
barely related to this anymore, but will be somewhat compatible in some
cases.
``--hwdec-extra-frames=<N>``
Number of GPU frames hardware decoding should preallocate (default: see
``--list-options`` output). If this is too low, frame allocation may fail
@ -2198,12 +2191,10 @@ Audio
their start timestamps differ, and then video timing is gradually adjusted
if necessary to reach correct synchronization later.
``--volume-max=<100.0-1000.0>``, ``--softvol-max=<...>``
``--volume-max=<100.0-1000.0>``
Set the maximum amplification level in percent (default: 130). A value of
130 will allow you to adjust the volume up to about double the normal level.
``--softvol-max`` is a deprecated alias and should not be used.
``--audio-file-auto=<no|exact|fuzzy|all>``, ``--no-audio-file-auto``
Load additional audio files matching the video filename. The parameter
specifies how external audio files are matched.
@ -2278,11 +2269,6 @@ Subtitles
Subtitles in ASS format are normally not changed intentionally, but
overriding them can be controlled with ``--sub-ass-override``.
Previously some options working on text subtitles were called
``--sub-text-*``, they are now named ``--sub-*``, and those specifically
for ASS have been renamed from ``--ass-*`` to ``--sub-ass-*``.
They are now all in this section.
``--sub-demuxer=<[+]name>``
Force subtitle demuxer type for ``--sub-file``. Give the demuxer name as
printed by ``--sub-demuxer=help``.
@ -2481,9 +2467,6 @@ Subtitles
Default: yes.
Renamed from ``--sub-ass-use-margins``. To place ASS subtitles in the borders
too (like the old option did), also add ``--sub-ass-force-margins``.
``--sub-ass-vsfilter-aspect-compat=<yes|no>``
Stretch SSA/ASS subtitles when playing anamorphic videos for compatibility
with traditional VSFilter behavior. This switch has no effect when the
@ -2677,9 +2660,6 @@ Subtitles
Never applied to text subtitles.
``--sub-paths=<path1:path2:...>``
Deprecated, use ``--sub-file-paths``.
``--sub-file-paths=<path-list>``
Specify extra directories to search for subtitles matching the video.
Multiple directories can be separated by ":" (";" on Windows).
@ -3310,10 +3290,6 @@ Window
fullscreen mode, the cursor is shown or hidden according to
``--cursor-autohide``.
``--no-fixed-vo``, ``--fixed-vo``
``--no-fixed-vo`` enforces closing and reopening the video window for
multiple files (one (un)initialization for each file).
``--force-rgba-osd-rendering``
Change how some video outputs render the OSD and text subtitles. This
does not change appearance of the subtitles and only has performance
@ -3680,7 +3656,7 @@ Demuxer
If this option is deemed unnecessary at some point in the future, it will
be removed without notice.
``--demuxer-mkv-subtitle-preroll=<yes|index|no>``, ``--mkv-subtitle-preroll``
``--demuxer-mkv-subtitle-preroll=<yes|index|no>``
Try harder to show embedded soft subtitles when seeking somewhere. Normally,
it can happen that the subtitle at the seek target is not shown due to how
some container file formats are designed. The subtitles appear only if
@ -3723,8 +3699,6 @@ Demuxer
but makes seeking much slower, as it has to decode audio and video data
instead of just skipping over it.
``--mkv-subtitle-preroll`` is a deprecated alias.
``--demuxer-mkv-subtitle-preroll-secs=<value>``
See ``--demuxer-mkv-subtitle-preroll``.
@ -4150,8 +4124,6 @@ Input
disabled by default in libmpv as well - it should be enabled if you want
the mpv default key bindings.
(This option was renamed from ``--input-x11-keyboard``.)
OSD
---
@ -6153,9 +6125,7 @@ them.
chain will be used for D3D9. This option is mainly for debugging purposes,
in case the custom swap chain has poor performance or does not work.
If set to ``yes``, the ``--angle-max-frame-latency``,
``--angle-swapchain-length`` and ``--angle-flip`` options will have no
effect.
If set to ``yes``, the ``--angle-flip`` option will have no effect.
Windows with ANGLE only.
@ -7285,10 +7255,6 @@ Miscellaneous
and its libraries contain certain hacks and workarounds for these issues,
that are unavailable to outside users.
This replaces ``--record-file``. It is similar to the ancient/removed
``--stream-capture``/``--capture`` options, and provides better behavior in
most cases (i.e. actually works).
``--lavfi-complex=<string>``
Set a "complex" libavfilter filter, which means a single filter graph can
take input from multiple source audio and video tracks. The graph can result

View File

@ -95,13 +95,6 @@ const struct m_sub_options encode_config = {
{"ocopy-metadata", OPT_BOOL(copy_metadata)},
{"oset-metadata", OPT_KEYVALUELIST(set_metadata)},
{"oremove-metadata", OPT_STRINGLIST(remove_metadata)},
{"ocopyts", OPT_REMOVED("ocopyts is now the default")},
{"oneverdrop", OPT_REMOVED("no replacement")},
{"oharddup", OPT_REMOVED("use --vf-add=fps=VALUE")},
{"ofps", OPT_REMOVED("no replacement (use --vf-add=fps=VALUE for CFR)")},
{"oautofps", OPT_REMOVED("no replacement")},
{"omaxfps", OPT_REMOVED("no replacement")},
{0}
},
.size = sizeof(struct encode_opts),

View File

@ -203,10 +203,6 @@ const struct m_sub_options input_config = {
{"input-gamepad", OPT_BOOL(use_gamepad)},
#endif
{"window-dragging", OPT_BOOL(allow_win_drag)},
{"input-x11-keyboard", OPT_REPLACED("input-vo-keyboard")},
#if HAVE_COCOA
{"input-appleremote", OPT_REMOVED("replaced by MediaPlayer support")},
#endif
{0}
},
.size = sizeof(struct input_opts),

View File

@ -91,7 +91,6 @@ extern const struct m_sub_options spirv_conf;
extern const struct m_sub_options d3d11_conf;
extern const struct m_sub_options d3d11va_conf;
extern const struct m_sub_options angle_conf;
extern const struct m_sub_options cocoa_conf;
extern const struct m_sub_options macos_conf;
extern const struct m_sub_options wayland_conf;
extern const struct m_sub_options vaapi_conf;
@ -826,10 +825,6 @@ static const m_option_t mp_opts[] = {
{"", OPT_SUBSTRUCT(angle_opts, angle_conf)},
#endif
#if HAVE_GL_COCOA
{"", OPT_SUBSTRUCT(cocoa_opts, cocoa_conf)},
#endif
#if HAVE_COCOA
{"", OPT_SUBSTRUCT(macos_opts, macos_conf)},
#endif
@ -864,122 +859,7 @@ static const m_option_t mp_opts[] = {
{"", OPT_SUBSTRUCT(encode_opts, encode_config)},
{"a52drc", OPT_REMOVED("use --ad-lavc-ac3drc=level")},
{"afm", OPT_REMOVED("use --ad=...")},
{"aspect", OPT_REPLACED("video-aspect-override")},
{"ass-bottom-margin", OPT_REMOVED("use --vf=sub=bottom:top")},
{"ass", OPT_REPLACED("sub-ass")},
{"audiofile", OPT_REPLACED("audio-file")},
{"benchmark", OPT_REMOVED("use --untimed (no stats)")},
{"capture", OPT_REMOVED(NULL)},
{"stream-capture", OPT_REMOVED(NULL)},
{"channels", OPT_REMOVED("use --audio-channels (changed semantics)")},
{"cursor-autohide-delay", OPT_REPLACED("cursor-autohide")},
{"delay", OPT_REPLACED("audio-delay")},
{"dumpstream", OPT_REMOVED("use --stream-dump=<filename>")},
{"dvdangle", OPT_REPLACED("dvd-angle")},
{"endpos", OPT_REPLACED("length")},
{"font", OPT_REPLACED("osd-font")},
{"sub-forced-only", OPT_REPLACED("sub-forced-events-only")},
{"forcedsubsonly", OPT_REPLACED("sub-forced-only")},
{"format", OPT_REPLACED("audio-format")},
{"hardframedrop", OPT_REMOVED(NULL)},
{"identify", OPT_REMOVED("use TOOLS/mpv_identify.sh")},
{"lavdopts", OPT_REMOVED("use --vd-lavc-...")},
{"lavfdopts", OPT_REMOVED("use --demuxer-lavf-...")},
{"lua", OPT_REPLACED("script")},
{"lua-opts", OPT_REPLACED("script-opts")},
{"mixer-channel", OPT_REMOVED("use AO suboptions (alsa, oss)")},
{"mixer", OPT_REMOVED("use AO suboptions (alsa, oss)")},
{"mouse-movements", OPT_REPLACED("input-cursor")},
{"msgcolor", OPT_REPLACED("msg-color")},
{"msglevel", OPT_REMOVED("use --msg-level (changed semantics)")},
{"msgmodule", OPT_REPLACED("msg-module")},
{"name", OPT_REPLACED("x11-name")},
{"noar", OPT_REPLACED("no-input-appleremote")},
{"noautosub", OPT_REPLACED("no-sub-auto")},
{"noconsolecontrols", OPT_REPLACED("no-input-terminal")},
{"nosound", OPT_REPLACED("no-audio")},
{"osdlevel", OPT_REPLACED("osd-level")},
{"panscanrange", OPT_REMOVED("use --video-zoom, --video-pan-x/y")},
{"playing-msg", OPT_REPLACED("term-playing-msg")},
{"pp", OPT_REMOVED(NULL)},
{"pphelp", OPT_REMOVED(NULL)},
{"rawaudio", OPT_REMOVED("use --demuxer-rawaudio-...")},
{"rawvideo", OPT_REMOVED("use --demuxer-rawvideo-...")},
{"spugauss", OPT_REPLACED("sub-gauss")},
{"srate", OPT_REPLACED("audio-samplerate")},
{"ss", OPT_REPLACED("start")},
{"stop-xscreensaver", OPT_REPLACED("stop-screensaver")},
{"sub-fuzziness", OPT_REPLACED("sub-auto")},
{"subcp", OPT_REPLACED("sub-codepage")},
{"subdelay", OPT_REPLACED("sub-delay")},
{"subfile", OPT_REPLACED("sub-file")},
{"subfont-text-scale", OPT_REPLACED("sub-scale")},
{"subfont", OPT_REPLACED("sub-text-font")},
{"subfps", OPT_REPLACED("sub-fps")},
{"subpos", OPT_REPLACED("sub-pos")},
{"tvscan", OPT_REPLACED("tv-scan")},
{"use-filename-title", OPT_REMOVED("use --title='${filename}'")},
{"vc", OPT_REMOVED("use --vd=..., --hwdec=...")},
{"vobsub", OPT_REMOVED("use --sub-file (pass the .idx file)")},
{"xineramascreen", OPT_REMOVED("use --screen (different values)")},
{"xy", OPT_REMOVED("use --autofit")},
{"zoom", OPT_REMOVED("Inverse available as ``--video-unscaled")},
{"media-keys", OPT_REPLACED("input-media-keys")},
{"right-alt-gr", OPT_REPLACED("input-right-alt-gr")},
{"autosub", OPT_REPLACED("sub-auto")},
{"autosub-match", OPT_REPLACED("sub-auto")},
{"status-msg", OPT_REPLACED("term-status-msg")},
{"idx", OPT_REPLACED("index")},
{"forceidx", OPT_REPLACED("index")},
{"cache-pause-below", OPT_REMOVED("for 'no', use --no-cache-pause")},
{"no-cache-pause-below", OPT_REMOVED("use --no-cache-pause")},
{"volstep", OPT_REMOVED("edit input.conf directly instead")},
{"fixed-vo", OPT_REMOVED("--fixed-vo=yes is now the default")},
{"mkv-subtitle-preroll", OPT_REPLACED("demuxer-mkv-subtitle-preroll")},
{"ass-use-margins", OPT_REPLACED("sub-use-margins")},
{"media-title", OPT_REPLACED("force-media-title")},
{"input-unix-socket", OPT_REPLACED("input-ipc-server")},
{"softvol-max", OPT_REPLACED("volume-max")},
{"bluray-angle", OPT_REMOVED("this didn't do anything for a few releases")},
{"sub-text-font", OPT_REPLACED("sub-font")},
{"sub-text-font-size", OPT_REPLACED("sub-font-size")},
{"sub-text-color", OPT_REPLACED("sub-color")},
{"sub-text-border-color", OPT_REPLACED("sub-border-color")},
{"sub-text-shadow-color", OPT_REPLACED("sub-shadow-color")},
{"sub-text-back-color", OPT_REPLACED("sub-back-color")},
{"sub-text-border-size", OPT_REPLACED("sub-border-size")},
{"sub-text-shadow-offset", OPT_REPLACED("sub-shadow-offset")},
{"sub-text-spacing", OPT_REPLACED("sub-spacing")},
{"sub-text-margin-x", OPT_REPLACED("sub-margin-x")},
{"sub-text-margin-y", OPT_REPLACED("sub-margin-y")},
{"sub-text-align-x", OPT_REPLACED("sub-align-x")},
{"sub-text-align-y", OPT_REPLACED("sub-align-y")},
{"sub-text-blur", OPT_REPLACED("sub-blur")},
{"sub-text-bold", OPT_REPLACED("sub-bold")},
{"sub-text-italic", OPT_REPLACED("sub-italic")},
{"ass-line-spacing", OPT_REPLACED("sub-ass-line-spacing")},
{"ass-force-margins", OPT_REPLACED("sub-ass-force-margins")},
{"ass-vsfilter-aspect-compat", OPT_REPLACED("sub-ass-vsfilter-aspect-compat")},
{"ass-vsfilter-color-compat", OPT_REPLACED("sub-ass-vsfilter-color-compat")},
{"ass-vsfilter-blur-compat", OPT_REPLACED("sub-ass-vsfilter-blur-compat")},
{"ass-force-style", OPT_REPLACED("sub-ass-force-style")},
{"ass-styles", OPT_REPLACED("sub-ass-styles")},
{"ass-hinting", OPT_REPLACED("sub-ass-hinting")},
{"ass-shaper", OPT_REPLACED("sub-ass-shaper")},
{"ass-style-override", OPT_REPLACED("sub-ass-style-override")},
{"ass-scale-with-window", OPT_REPLACED("sub-ass-scale-with-window")},
{"sub-ass-style-override", OPT_REPLACED("sub-ass-override")},
{"fs-black-out-screens", OPT_REMOVED(NULL)},
{"sub-paths", OPT_REPLACED("sub-file-paths")},
{"heartbeat-cmd", OPT_REMOVED("use Lua scripting instead")},
{"no-ometadata", OPT_REMOVED("use --no-ocopy-metadata")},
{"video-stereo-mode", OPT_REMOVED("removed, try --vf=stereo3d")},
{"chapter", OPT_REMOVED("use '--start=#123' '--end=#124' (for chapter 123)")},
{"video-aspect", OPT_REPLACED("video-aspect-override")},
{"display-fps", OPT_REPLACED("override-display-fps")},
{0}
};

View File

@ -367,7 +367,6 @@ typedef struct MPOpts {
struct spirv_opts *spirv_opts;
struct d3d11_opts *d3d11_opts;
struct d3d11va_opts *d3d11va_opts;
struct cocoa_opts *cocoa_opts;
struct macos_opts *macos_opts;
struct drm_opts *drm_opts;
struct wayland_opts *wayland_opts;

View File

@ -70,8 +70,6 @@ const struct m_sub_options macos_conf = {
{"cocoa-cb-sw-renderer", OPT_CHOICE(cocoa_cb_sw_renderer,
{"auto", -1}, {"no", 0}, {"yes", 1})},
{"cocoa-cb-10bit-context", OPT_BOOL(cocoa_cb_10bit_context)},
{"macos-title-bar-style", OPT_REMOVED("Split into --macos-title-bar-appearance "
"and --macos-title-bar-material")},
{0}
},
.size = sizeof(struct macos_opts),

View File

@ -86,7 +86,6 @@ const struct m_sub_options stream_cdda_conf = {
{"span-a", OPT_INT(span[0])},
{"span-b", OPT_INT(span[1])},
{"cdtext", OPT_BOOL(cdtext)},
{"span", OPT_REMOVED("use span-a/span-b")},
{0}
},
.size = sizeof(struct cdda_params),

View File

@ -226,8 +226,6 @@ static const m_option_t vf_opts_fields[] = {
{"auto", MP_SWS_AUTO},
{"sws", MP_SWS_SWS},
{"zimg", MP_SWS_ZIMG})},
{"outputlevels", OPT_REMOVED("use the --video-output-levels global option")},
{"peak", OPT_REMOVED("use sig-peak instead (changed value scale!)")},
{0}
};

View File

@ -98,10 +98,6 @@ const struct m_sub_options drm_conf = {
{"drm-draw-surface-size", OPT_SIZE_BOX(draw_surface_size)},
{"drm-vrr-enabled", OPT_CHOICE(vrr_enabled,
{"no", 0}, {"yes", 1}, {"auto", -1})},
{"drm-osd-plane-id", OPT_REPLACED("drm-draw-plane")},
{"drm-video-plane-id", OPT_REPLACED("drm-drmprime-video-plane")},
{"drm-osd-size", OPT_REPLACED("drm-draw-surface-size")},
{0},
},
.defaults = &(const struct drm_opts) {

View File

@ -514,8 +514,6 @@ const struct m_sub_options mp_icc_conf = {
M_RANGE(0, 1000000)},
{"icc-3dlut-size", OPT_STRING_VALIDATE(size_str, validate_3dlut_size_opt)},
{"icc-use-luma", OPT_BOOL(icc_use_luma)},
{"3dlut-size", OPT_REPLACED("icc-3dlut-size")},
{"icc-contrast", OPT_REMOVED("see icc-force-contrast")},
{0}
},
.size = sizeof(struct mp_icc_opts),

View File

@ -476,19 +476,6 @@ const struct m_sub_options gl_video_conf = {
{"gpu-shader-cache-dir", OPT_STRING(shader_cache_dir), .flags = M_OPT_FILE},
{"gpu-hwdec-interop",
OPT_STRING_VALIDATE(hwdec_interop, ra_hwdec_validate_opt)},
{"opengl-hwdec-interop", OPT_REPLACED("gpu-hwdec-interop")},
{"hwdec-preload", OPT_REPLACED("opengl-hwdec-interop")},
{"hdr-tone-mapping", OPT_REPLACED("tone-mapping")},
{"opengl-shaders", OPT_REPLACED("glsl-shaders")},
{"opengl-shader", OPT_REPLACED("glsl-shader")},
{"opengl-shader-cache-dir", OPT_REPLACED("gpu-shader-cache-dir")},
{"opengl-tex-pad-x", OPT_REPLACED("gpu-tex-pad-x")},
{"opengl-tex-pad-y", OPT_REPLACED("gpu-tex-pad-y")},
{"opengl-fbo-format", OPT_REPLACED("fbo-format")},
{"opengl-dumb-mode", OPT_REPLACED("gpu-dumb-mode")},
{"opengl-gamma", OPT_REPLACED("gamma-factor")},
{"linear-scaling", OPT_REMOVED("Split into --linear-upscaling and "
"--linear-downscaling")},
{"gamut-warning", OPT_REMOVED("Replaced by --gamut-mapping-mode=warn")},
{"gamut-clipping", OPT_REMOVED("Replaced by --gamut-mapping-mode=desaturate")},
{"tone-mapping-desaturate", OPT_REMOVED("Replaced by --tone-mapping-mode")},

View File

@ -60,15 +60,10 @@ const struct m_sub_options opengl_conf = {
{"opengl-swapinterval", OPT_INT(swapinterval)},
{"opengl-check-pattern-a", OPT_INT(vsync_pattern[0])},
{"opengl-check-pattern-b", OPT_INT(vsync_pattern[1])},
{"opengl-restrict", OPT_REMOVED(NULL)},
{"opengl-es", OPT_CHOICE(gles_mode,
{"auto", GLES_AUTO}, {"yes", GLES_YES}, {"no", GLES_NO})},
{"opengl-early-flush", OPT_CHOICE(early_flush,
{"no", FLUSH_NO}, {"yes", FLUSH_YES}, {"auto", FLUSH_AUTO})},
{"opengl-debug", OPT_REPLACED("gpu-debug")},
{"opengl-sw", OPT_REPLACED("gpu-sw")},
{"opengl-vsync-fences", OPT_REPLACED("swapchain-depth")},
{"opengl-backend", OPT_REPLACED("gpu-context")},
{0},
},
.defaults = &(const struct opengl_opts) {

View File

@ -78,8 +78,6 @@ const struct m_sub_options angle_conf = {
{"no", 0},
{"yes", 1})},
{"angle-flip", OPT_BOOL(flip)},
{"angle-max-frame-latency", OPT_REPLACED("swapchain-depth")},
{"angle-swapchain-length", OPT_REMOVED("controlled by --swapchain-depth")},
{0}
},
.defaults = &(const struct angle_opts) {

View File

@ -22,25 +22,12 @@
#include "context.h"
#include "osdep/macosx_application.h"
struct cocoa_opts {
};
#define OPT_BASE_STRUCT struct cocoa_opts
const struct m_sub_options cocoa_conf = {
.opts = (const struct m_option[]) {
{"cocoa-force-dedicated-gpu", OPT_REPLACED("macos-force-dedicated-gpu")},
{0}
},
.size = sizeof(struct cocoa_opts),
};
struct priv {
GL gl;
void (GLAPIENTRY *Flush)(void);
CGLPixelFormatObj pix;
CGLContextObj ctx;
struct cocoa_opts *opts;
struct macos_opts *macos_opts;
};
@ -169,7 +156,6 @@ static bool cocoa_init(struct ra_ctx *ctx)
{
struct priv *p = ctx->priv = talloc_zero(ctx, struct priv);
GL *gl = &p->gl;
p->opts = mp_get_config_group(ctx, ctx->global, &cocoa_conf);
p->macos_opts = mp_get_config_group(ctx, ctx->global, &macos_conf);
vo_cocoa_init(ctx->vo);

View File

@ -1133,9 +1133,6 @@ const struct vo_driver video_out_vdpau = {
{"colorkey", OPT_COLOR(colorkey),
.defval = &(const struct m_color){.r = 2, .g = 5, .b = 7, .a = 255}},
{"force-yuv", OPT_BOOL(force_yuv)},
{"queuetime_windowed", OPT_REPLACED("queuetime-windowed")},
{"queuetime_fs", OPT_REPLACED("queuetime-fs")},
{"output_surfaces", OPT_REPLACED("output-surfaces")},
{NULL},
},
.options_prefix = "vo-vdpau",

View File

@ -926,7 +926,6 @@ const struct vo_driver video_out_xv = {
{"auto", CK_METHOD_AUTOPAINT})},
{"colorkey", OPT_INT(colorkey)},
{"buffers", OPT_INT(cfg_buffers), M_RANGE(1, MAX_BUFFERS)},
{"no-colorkey", OPT_REMOVED("use ck-method=none instead")},
{0}
},
.options_prefix = "xv",