1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 20:27:23 +00:00

command: deprecate "cache" property, replace with "cache-percent"

The --cache option and cache property conflict, so one of them has to be
renamed. The option is probably used frequently, so initiate
deprecation/rename of the property.
This commit is contained in:
wm4 2016-09-02 09:42:19 +02:00
parent ce05413a87
commit 3659f9e416
3 changed files with 6 additions and 7 deletions

View File

@ -33,6 +33,7 @@ Interface changes
- "demuxer" -> "current-demuxer"
- "fps" -> "container-fps"
- "idle" -> "idle-active"
- "cache" -> "cache-percent"
the old names are deprecated
- remove deprecated "hwdec-active" and "hwdec-detected" properties
- remove "pre-shaders", "post-shaders" and "scale-shader": deprecated

View File

@ -2089,11 +2089,7 @@ caveats with some properties (due to historical reasons):
If a VO is created, this will return either the actual display FPS, or
an invalid value, instead of the option value.
``cache``
This behaves completely different as property: instead of configuring the
cache size like the option, it returns the cache state in percent.
``demuxer``, ``idle``, ``length``, ``audio-samplerate``, ``audio-channels``, ``audio-format``, ``fps``
``demuxer``, ``idle``, ``length``, ``audio-samplerate``, ``audio-channels``, ``audio-format``, ``fps``, ``cache``
These behave completely different as property, but are deprecated (newer
aliases which don't conflict have been added). After the deprecation period
they will be changed to the proper option behavior.

View File

@ -3717,7 +3717,8 @@ static const struct m_property mp_properties_base[] = {
{"eof-reached", mp_property_eof_reached},
{"seeking", mp_property_seeking},
{"playback-abort", mp_property_playback_abort},
{"cache", mp_property_cache}, // conflicts with option
{"cache-percent", mp_property_cache},
M_PROPERTY_DEPRECATED_ALIAS("cache", "cache-percent"), // conflicts with option
{"cache-free", mp_property_cache_free},
{"cache-used", mp_property_cache_used},
{"cache-size", mp_property_cache_size},
@ -3944,7 +3945,8 @@ static const char *const *const mp_event_property_change[] = {
E(MPV_EVENT_CHAPTER_CHANGE, "chapter", "chapter-metadata"),
E(MP_EVENT_CACHE_UPDATE, "cache", "cache-free", "cache-used", "cache-idle",
"demuxer-cache-duration", "demuxer-cache-idle", "paused-for-cache",
"demuxer-cache-time", "cache-buffering-state", "cache-speed"),
"demuxer-cache-time", "cache-buffering-state", "cache-speed",
"cache-percent"),
E(MP_EVENT_WIN_RESIZE, "window-scale", "osd-width", "osd-height", "osd-par"),
E(MP_EVENT_WIN_STATE, "window-minimized", "display-names", "display-fps",
"fullscreen"),