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. --- DOCS/man/en/input.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'DOCS/man') diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst index a1e4ee45e3..e64bc7ebef 100644 --- a/DOCS/man/en/input.rst +++ b/DOCS/man/en/input.rst @@ -715,6 +715,18 @@ an option at runtime. ``cache`` Network cache fill state (0-100). +``cache-size`` (RW) + Total network cache size in KB. This is similar to ``--cache``. This allows + to set the cache size at runtime. Currently, it's not possible to enable + or disable the cache at runtime using this property, just to resize an + existing cache. + + Note that this tries to keep the cache contents as far as possible. To make + this easier, the cache resizing code will allocate the new cache while the + old cache is still allocated. + + Don't use this when playing DVD or Bluray. + ``pts-association-mode`` (RW) See ``--pts-association-mode``. -- cgit v1.2.3