mpv/DOCS
wm4 17da9071a4 demux: add a on-disk cache
Somewhat similar to the old --cache-file, except for the demuxer cache.
Instead of keeping packet data in memory, it's written to disk and read
back when needed.

The idea is to reduce main memory usage, while allowing fast seeking in
large cached network streams (especially live streams). Keeping the
packet metadata on disk would be rather hard (would use mmap or so, or
rewrite the entire demux.c packet queue handling), and since it's
relatively small, just keep it in memory.

Also for simplicity, the disk cache is append-only. If you're watching
really long livestreams, and need pruning, you're probably out of luck.
This still could be improved by trying to free unused blocks with
fallocate(), but since we're writing multiple streams in an interleaved
manner, this is slightly hard.

Some rather gross ugliness in packet.h: we want to store the file
position of the cached data somewhere, but on 32 bit architectures, we
don't have any usable 64 bit members for this, just the buf/len fields,
which add up to 64 bit - so the shitty union aliases this memory.

Error paths untested. Side data (the complicated part of trying to
serialize ffmpeg packets) untested.

Stream recording had to be adjusted. Some minor details change due to
this, but probably nothing important.

The change in attempt_range_joining() is because packets in cache
have no valid len field. It was a useful check (heuristically
finding broken cases), but not a necessary one.

Various other approaches were tried. It would be interesting to list
them and to mention the pros and cons, but I don't feel like it.
2019-09-19 20:37:05 +02:00
..
man demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
client-api-changes.rst drm: fix libmpv ABI breakage introduced in 351c083487 2019-09-18 23:59:32 +03:00
compile-windows.md DOCS/compile-windows: remove angleproject-git from deps 2019-07-30 23:57:50 +01:00
contribute.md DOCS/contribute.md: fix a typo 2017-11-30 20:36:09 +01:00
edl-mpv.rst DOCS/edl-mpv.rst: make clear the DASH stuff is for internal use only 2019-09-19 20:37:04 +02:00
encoding.rst encode: remove old timestamp handling 2018-05-03 01:08:44 +03:00
interface-changes.rst options: remove --chapter 2019-09-19 20:37:05 +02:00
mplayer-changes.rst vo_opengl: refactor into vo_gpu 2017-09-21 15:00:55 +02:00
release-policy.md
tech-overview.txt video: change some remaining vo_opengl mentions to vo_gpu 2018-01-20 14:43:49 -08:00
waf-buildsystem.rst