summaryrefslogtreecommitdiffstats
path: root/cfg-mplayer.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-08-19 15:31:38 +0200
committerwm4 <wm4@nowhere>2012-09-18 21:07:30 +0200
commit70e7d63ba011a326f5e03137b8fb45df222c43af (patch)
tree7537f596d739f09837f43cf7078cd46bda265527 /cfg-mplayer.h
parent1959ba006ce1a4591f3dcd5093901993e3fdda5f (diff)
downloadmpv-70e7d63ba011a326f5e03137b8fb45df222c43af.tar.bz2
mpv-70e7d63ba011a326f5e03137b8fb45df222c43af.tar.xz
core, timeline: cache external ordered chapter files too
Previously, Matroska source files other than the initially opened one were always accessed without caching. Enable cache for extra files too. A separate cache process/thread is started for each file, which is less than optimal but probably better than no caching if the user explicitly enabled cache. This commit only implements caching for Matroska ordered chapters (not for EDL timeline). To build the timeline we need to demux the files in the current directory to look for segments with matching uuid. This first demux is done with no cache since we don't need to read a lot of the stream. If the file is recognized as one of the needed sources it's reopened with cache enabled. Also move the stream_cache_size global variable to the options struct. Conflicts: cfg-mplayer.h mplayer.c stream/stream.h timeline/tl_matroska.c
Diffstat (limited to 'cfg-mplayer.h')
-rw-r--r--cfg-mplayer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index fa5f35af6c..529df35caf 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -336,8 +336,9 @@ const m_option_t common_opts[] = {
// ------------------------- stream options --------------------
#ifdef CONFIG_STREAM_CACHE
- {"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 0x7fffffff, NULL},
- {"no-cache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+ OPT_INTRANGE("cache", stream_cache_size, 0, 32, 0x7fffffff, OPTDEF_INT(-1)),
+ OPT_FLAG_CONSTANTS("nocache", stream_cache_size, 0, -1, 0),
+
OPT_FLOATRANGE("cache-min", stream_cache_min_percent, 0, 0, 99),
OPT_FLOATRANGE("cache-seek-min", stream_cache_seek_min_percent, 0, 0, 99),
#endif /* CONFIG_STREAM_CACHE */