diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-18 11:43:25 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-18 17:13:15 +0000 |
commit | 7a76cf4d65fc56fbf0a0f600ec770324c44b81e7 (patch) | |
tree | 5957811ba3cf423f82ac967dfafa66c72fa67512 | |
parent | 1c09ee44c3b0d1001b38ca3dfd030fca644ac5ff (diff) | |
download | mpv-7a76cf4d65fc56fbf0a0f600ec770324c44b81e7.tar.bz2 mpv-7a76cf4d65fc56fbf0a0f600ec770324c44b81e7.tar.xz |
demux: prepend some cache options with demuxer
--cache-dir is an awful name that leads to confusion (see #12418).
Change the name to --demuxer-cache-dir and --demuxer-cache-unlink-files
instead.
-rw-r--r-- | DOCS/interface-changes.rst | 2 | ||||
-rw-r--r-- | DOCS/man/options.rst | 4 | ||||
-rw-r--r-- | demux/cache.c | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 0dfd8331f3..6ebeea07c1 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -61,6 +61,8 @@ Interface changes - add `--scale=ewa_lanczos4sharpest` - remove `--scale-wblur`, `--cscale-wblur`, `--dscale-wblur`, `--tscale-wblur` - remove `bcspline` filter (`bicubic` is now the same as `bcspline`) + - rename `--cache-dir` and `--cache-unlink-files` to `--demuxer-cache-dir` and + `--demuxer-cache-unlink-files` --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 7d354adde2..35b5ebc5b6 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4905,7 +4905,7 @@ Cache media is closed. If the option is disabled and enabled again, it will continue to use the cache file that was opened first. -``--cache-dir=<path>`` +``--demuxer-cache-dir=<path>`` Directory where to create temporary files. Cache is stored in the system's cache directory (usually ``~/.cache/mpv``) if this is unset. @@ -4939,7 +4939,7 @@ Cache This option also triggers when playback is restarted after seeking. -``--cache-unlink-files=<immediate|whendone|no>`` +``--demuxer-cache-unlink-files=<immediate|whendone|no>`` Whether or when to unlink cache files (default: immediate). This affects cache files which are inherently temporary, and which make no sense to remain on disk after the player terminates. This is a debugging option. diff --git a/demux/cache.c b/demux/cache.c index 106f53dbed..562eab087b 100644 --- a/demux/cache.c +++ b/demux/cache.c @@ -40,10 +40,12 @@ struct demux_cache_opts { const struct m_sub_options demux_cache_conf = { .opts = (const struct m_option[]){ - {"cache-dir", OPT_STRING(cache_dir), .flags = M_OPT_FILE}, - {"cache-unlink-files", OPT_CHOICE(unlink_files, + {"demuxer-cache-dir", OPT_STRING(cache_dir), .flags = M_OPT_FILE}, + {"demuxer-cache-unlink-files", OPT_CHOICE(unlink_files, {"immediate", 2}, {"whendone", 1}, {"no", 0}), }, + {"cache-dir", OPT_REPLACED("demuxer-cache-dir")}, + {"cache-unlink-files", OPT_REPLACED("demuxer-cache-unlink-files")}, {0} }, .size = sizeof(struct demux_cache_opts), |