From 5f65a5cfea020dc0e3f718da48a937f29eb1993b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 9 Apr 2014 19:15:23 +0200 Subject: 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. --- stream/stream.h | 1 + 1 file changed, 1 insertion(+) (limited to 'stream/stream.h') 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, -- cgit v1.2.3