summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
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 /stream/stream.h
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 'stream/stream.h')
-rw-r--r--stream/stream.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 0fabd62b1f..3675ea9732 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -177,14 +177,13 @@ int stream_fill_buffer(stream_t *s);
void stream_set_capture_file(stream_t *s, const char *filename);
-int stream_enable_cache_percent(stream_t **stream, int64_t stream_cache_size,
- int64_t stream_cache_def_size,
- float stream_cache_min_percent,
- float stream_cache_seek_min_percent);
+struct mp_cache_opts;
+bool stream_wants_cache(stream_t *stream, struct mp_cache_opts *opts);
+int stream_enable_cache(stream_t **stream, struct mp_cache_opts *opts);
// Internal
-int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size,
- int64_t min, int64_t seek_limit);
+int stream_cache_init(stream_t *cache, stream_t *stream,
+ struct mp_cache_opts *opts);
int stream_write_buffer(stream_t *s, unsigned char *buf, int len);