From 5b8298376b3ea548b21b652c495b5fcf3d4b5e78 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Jun 2014 02:50:52 +0200 Subject: stream: add a file cache For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again. --- options/options.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index e2ce57955e..c6f758a647 100644 --- a/options/options.c +++ b/options/options.c @@ -139,6 +139,8 @@ 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_STRING("cache-file", stream_cache.file, 0), + OPT_INTRANGE("cache-file-size", stream_cache.file_max, 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), @@ -573,6 +575,7 @@ const struct MPOpts mp_default_opts = { .def_size = 25000, .initial = 0, .seek_min = 500, + .file_max = 1024 * 1024, }, .stream_cache_pause = 500, .stream_cache_unpause = 1000, -- cgit v1.2.3