summaryrefslogtreecommitdiffstats
path: root/player/timeline
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-19 23:27:09 +0200
committerwm4 <wm4@nowhere>2014-05-20 02:40:22 +0200
commit4664f8b3b7cd5089463623df02655ec11e258671 (patch)
tree1dfe5ed9633762ec8f50deabaa4e23b24104f401 /player/timeline
parentac66bcc25955b41f71202273490d4073a013a7db (diff)
downloadmpv-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 'player/timeline')
-rw-r--r--player/timeline/tl_matroska.c8
-rw-r--r--player/timeline/tl_mpv_edl.c6
2 files changed, 3 insertions, 11 deletions
diff --git a/player/timeline/tl_matroska.c b/player/timeline/tl_matroska.c
index 176d35c21f..cfcc379867 100644
--- a/player/timeline/tl_matroska.c
+++ b/player/timeline/tl_matroska.c
@@ -119,7 +119,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream,
{
struct MPOpts *opts = mpctx->opts;
- if (opts->stream_cache_size <= 0)
+ if (!stream_wants_cache(*stream, &opts->stream_cache))
return 0;
char *filename = talloc_strdup(NULL, (*demuxer)->filename);
@@ -132,11 +132,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream,
return -1;
}
- stream_enable_cache_percent(stream,
- opts->stream_cache_size,
- opts->stream_cache_def_size,
- opts->stream_cache_min_percent,
- opts->stream_cache_seek_min_percent);
+ stream_enable_cache(stream, &opts->stream_cache);
*demuxer = demux_open(*stream, "mkv", params, mpctx->global);
if (!*demuxer) {
diff --git a/player/timeline/tl_mpv_edl.c b/player/timeline/tl_mpv_edl.c
index 277db5b87f..7892d5294d 100644
--- a/player/timeline/tl_mpv_edl.c
+++ b/player/timeline/tl_mpv_edl.c
@@ -129,11 +129,7 @@ static struct demuxer *open_file(char *filename, struct MPContext *mpctx)
struct demuxer *d = NULL;
struct stream *s = stream_open(filename, mpctx->global);
if (s) {
- stream_enable_cache_percent(&s,
- opts->stream_cache_size,
- opts->stream_cache_def_size,
- opts->stream_cache_min_percent,
- opts->stream_cache_seek_min_percent);
+ stream_enable_cache(&s, &opts->stream_cache);
d = demux_open(s, NULL, NULL, mpctx->global);
}
if (!d) {