aboutsummaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-07-22 23:38:45 +0200
committerGravatar wm4 <wm4@nowhere>2015-07-22 23:55:10 +0200
commit55879a8c0fad68fbe889057c16fc8f15bf3efce2 (patch)
tree86cce8a35904a0633393d1798df79f955a2efbdb /options
parent63d112746dcf6b3c62b16cfd50eee91128054ce2 (diff)
cache: make backbuffer size configurable
Allow setting an arbitrary amount, instead of the fixed 50%. This is nto striclty backwards compatible. The defaults don't change, but the --cache/--cache-default options now set the readahead portion. So in practice, users who configured this until now will see the double amount of cache being used, _plus_ the 75MB default backbuffer will be in use.
Diffstat (limited to 'options')
-rw-r--r--options/options.c4
-rw-r--r--options/options.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index db91d66149..4f6839eede 100644
--- a/options/options.c
+++ b/options/options.c
@@ -156,6 +156,7 @@ const m_option_t mp_opts[] = {
({"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_INTRANGE("cache-backbuffer", stream_cache.back_buffer, 0, 0, 0x7fffffff),
OPT_STRING("cache-file", stream_cache.file, M_OPT_FILE),
OPT_INTRANGE("cache-file-size", stream_cache.file_max, 0, 0, 0x7fffffff),
@@ -712,9 +713,10 @@ const struct MPOpts mp_default_opts = {
.position_resume = 1,
.stream_cache = {
.size = -1,
- .def_size = 150000,
+ .def_size = 75000,
.initial = 0,
.seek_min = 500,
+ .back_buffer = 75000,
.file_max = 1024 * 1024,
},
.demuxer_thread = 1,
diff --git a/options/options.h b/options/options.h
index 5d8bd2ea09..3dcb783164 100644
--- a/options/options.h
+++ b/options/options.h
@@ -53,6 +53,7 @@ struct mp_cache_opts {
int def_size;
int initial;
int seek_min;
+ int back_buffer;
char *file;
int file_max;
};