diff options
author | wm4 <wm4@nowhere> | 2014-05-19 23:27:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-20 02:40:22 +0200 |
commit | 4664f8b3b7cd5089463623df02655ec11e258671 (patch) | |
tree | 1dfe5ed9633762ec8f50deabaa4e23b24104f401 /options/options.c | |
parent | ac66bcc25955b41f71202273490d4073a013a7db (diff) | |
download | mpv-4664f8b3b7cd5089463623df02655ec11e258671.tar.bz2 mpv-4664f8b3b7cd5089463623df02655ec11e258671.tar.xz |
cache: redo options and default settings
Some options change from percentages to number of kilobytes; there are
no cache options using percentages anymore.
Raise the default values. The cache is now 25000 kilobytes, although if
your connection is slow enough, the maximum is probably never reached.
(Although all the memory will still be used as seekback-cache.)
Remove the separate --audio-file-cache option, and use the cache default
settings for it.
Diffstat (limited to 'options/options.c')
-rw-r--r-- | options/options.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/options/options.c b/options/options.c index 1e17854dba..37bea53472 100644 --- a/options/options.c +++ b/options/options.c @@ -238,18 +238,16 @@ const m_option_t mp_opts[] = { // ------------------------- stream options -------------------- - OPT_CHOICE_OR_INT("cache", stream_cache_size, 0, 32, 0x7fffffff, + OPT_CHOICE_OR_INT("cache", stream_cache.size, 0, 32, 0x7fffffff, ({"no", 0}, - {"auto", -1}), - OPTDEF_INT(-1)), - OPT_CHOICE_OR_INT("cache-default", stream_cache_def_size, 0, 32, 0x7fffffff, - ({"no", 0}), - OPTDEF_INT(320)), - OPT_FLOATRANGE("cache-min", stream_cache_min_percent, 0, 0, 99), - OPT_FLOATRANGE("cache-seek-min", stream_cache_seek_min_percent, 0, - 0, 99), - OPT_CHOICE_OR_INT("cache-pause", stream_cache_pause, 0, - 0, 40, ({"no", -1})), + {"auto", -1})), + OPT_CHOICE_OR_INT("cache-default", stream_cache.def_size, 0, 32, 0x7fffffff, + ({"no", 0})), + OPT_INTRANGE("cache-initial", stream_cache.initial, 0, 0, 0x7fffffff), + OPT_INTRANGE("cache-seek-min", stream_cache.seek_min, 0, 0, 0x7fffffff), + OPT_CHOICE_OR_INT("cache-pause-below", stream_cache_pause, 0, 0, 0x7fffffff, + ({"no", 0})), + OPT_INTRANGE("cache-pause-restart", stream_cache_unpause, 0, 0, 0x7fffffff), {"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL}, #if HAVE_DVDREAD || HAVE_DVDNAV @@ -319,7 +317,6 @@ const m_option_t mp_opts[] = { // demuxer.c - select audio/sub file/demuxer OPT_STRING("audio-file", audio_stream, 0), - OPT_INTRANGE("audio-file-cache", audio_stream_cache, 0, 50, 65536), OPT_STRING("demuxer", demuxer_name, 0), OPT_STRING("audio-demuxer", audio_demuxer_name, 0), OPT_STRING("sub-demuxer", sub_demuxer_name, 0), @@ -692,9 +689,14 @@ const struct MPOpts mp_default_opts = { .hr_seek_framedrop = 1, .load_config = 1, .position_resume = 1, - .stream_cache_min_percent = 20.0, - .stream_cache_seek_min_percent = 50.0, - .stream_cache_pause = 10.0, + .stream_cache = { + .size = -1, + .def_size = 25000, + .initial = 0, + .seek_min = 500, + }, + .stream_cache_pause = 500, + .stream_cache_unpause = 1000, .network_rtsp_transport = 2, .chapterrange = {-1, -1}, .edition_id = -1, |