summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-09 19:15:23 +0200
committerwm4 <wm4@nowhere>2014-04-09 19:15:23 +0200
commit5f65a5cfea020dc0e3f718da48a937f29eb1993b (patch)
treee1992642765f8a7f7d1492e796db7fd240e17860 /stream/stream.h
parent6ac98c042f16d6b6a6f370905345678b42adf9e8 (diff)
downloadmpv-5f65a5cfea020dc0e3f718da48a937f29eb1993b.tar.bz2
mpv-5f65a5cfea020dc0e3f718da48a937f29eb1993b.tar.xz
cache: allow resizing at runtime
The only tricky part is keeping the cache contents, which is made simple by allocating the new cache while still keeping the old cache around, and then copying the old data. To explain the "Don't use this when playing DVD or Bluray." comment: the cache also associates timestamps to blocks of bytes, but throws away the timestamps on seek. Thus you will experience strange behavior after resizing the cache until the old cached region is exhausted.
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h
index c23d173165..589728d4ac 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -83,6 +83,7 @@ enum stream_ctrl {
STREAM_CTRL_GET_CURRENT_TITLE,
STREAM_CTRL_SET_CURRENT_TITLE,
STREAM_CTRL_GET_CACHE_SIZE,
+ STREAM_CTRL_SET_CACHE_SIZE,
STREAM_CTRL_GET_CACHE_FILL,
STREAM_CTRL_GET_CACHE_IDLE,
STREAM_CTRL_RESUME_CACHE,