summaryrefslogtreecommitdiffstats
path: root/stream/cache_file.c
Commit message (Collapse)AuthorAgeFilesLines
* cache_file: refuse to cache unseekable streamswm42014-09-291-0/+5
| | | | | | | | | This makes no sense to use with DVD/BD/DVB and some others, and these streams happen to be unseekable. Also, other kinds of unseekable streams (like reading from pipe) should work, but will exhibit sketchy behavior if they need to seek. So just disable it, and leave these problems to the memory cache (cache.c).
* cache_file: add a mode that creates a temporary filewm42014-08-301-1/+2
| | | | | | | Since we have to be portable, our options for creating temporary files are somewhat limited. tmpfile() happens to be available everywhere, so use that. This function doesn't allow having a "visible" filename or location, so we use the magic string "TMP" for this.
* cache_file: fix operation if stream size is unknownwm42014-07-121-2/+3
| | | | | | | | | | | | | Happens when playing from a pipe. Note that seeking forward doesn't work. It would be possible to create a workaround for that by reading and skipping data until the target position is reached (and writing the skipped data into the cache file), but I'm not sure about that. Fixes #928. CC: @mpv-player/stable
* cache_file: use unicode on windowswm42014-07-021-0/+2
| | | | This enables the MinGW Windows crap wrapper for fopen().
* stream: add a file cachewm42014-06-221-0/+149
For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again.