summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-25 15:03:30 +0200
committerwm4 <wm4@nowhere>2013-06-16 22:05:09 +0200
commit236577af09149eb59e13b5ce325809a48ac93088 (patch)
tree6945f99f02529c50fb9743b102fc2aec3d5c85f9 /DOCS
parent4abec2f7b2021d493d1aeefba5419963e6da698b (diff)
downloadmpv-236577af09149eb59e13b5ce325809a48ac93088.tar.bz2
mpv-236577af09149eb59e13b5ce325809a48ac93088.tar.xz
cache: use threads instead of fork()
Basically rewrite all the code supporting the cache (i.e. anything other than the ringbuffer logic). The underlying design is untouched. Note that the old cache2.c (on which this code is based) already had a threading implementation. This was mostly unused on Linux, and had some problems, such as using shared volatile variables for communication and uninterruptible timeouts, instead of using locks for synchronization. This commit does use proper locking, while still retaining the way the old cache worked. It's basically a big refactor. Simplify the code too. Since we don't need to copy stream ctrl args anymore (we're always guaranteed a shared address space now), lots of annoying code just goes away. Likewise, we don't need to care about sector sizes. The cache uses the high-level stream API to read from other streams, and sector sizes are handled transparently.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/options.rst21
1 files changed, 15 insertions, 6 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index bc78c2aeaf..3aa94ff33e 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -287,12 +287,15 @@
Adjust the brightness of the video signal (default: 0). Not supported by
all video output drivers.
---cache=<kBytes>
- Enable caching of the input stream (if not already enabled) and set the
- size of the cache in kilobytes. Caching is enabled by default (with a
- default cache size) for network streams. May be useful when playing files
- from slow media, but can also have negative effects, especially with file
- formats that require a lot of seeking, such as mp4. See also ``--no-cache``.
+--cache=<kBytes|no|auto>
+ Set the size of the cache in kilobytes, disable it with ``no``, or
+ automatically enable it if needed with ``auto`` (default: ``auto``).
+ With ``auto``, the cache will usually be enabled for network streams,
+ using a default size.
+
+ May be useful when playing files from slow media, but can also have
+ negative effects, especially with file formats that require a lot of
+ seeking, such as mp4.
Note that half the cache size will be used to allow fast seeking back. This
is also the reason why a full cache is usually reported as 50% full. The
@@ -319,6 +322,12 @@
filled to this position rather than performing a stream seek (default:
50).
+ This matters for small forward seeks. With slow streams (especially http
+ streams) there is a tradeoff between skipping the data between current
+ position and seek destination, or performing an actual seek. Depending
+ on the situation, either of these might be slower than the other method.
+ This option allows control over this.
+
--cdda=<option1:option2>
This option can be used to tune the CD Audio reading feature of mpv.