summaryrefslogtreecommitdiffstats
path: root/stream/rar.c
Commit message (Collapse)AuthorAgeFilesLines
* demux, stream: remove old rar support in favor of libarchivewm42019-09-131-451/+0
| | | | | | The old rar code could do uncompressed rar, libarchive supports at least some rar compression algorithms. There is no need to keep the old rar code.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* stream: remove stream filter conceptwm42015-02-271-4/+2
| | | | Unused since the previous commit. (Apparently it was a stupid idea.)
* stream: get rid of remaining uses of the end_pos fieldwm42015-02-061-2/+1
| | | | | | | | Most things stopped using this field for better support of growing files. Go through the trouble to repalce the remaining uses, so it can be removed. Also move the "streaming" field; saves 4 bytes (wow!).
* Remove some unneeded NULL checkswm42014-11-211-3/+2
| | | | Found by Coverity; also see commit 85fb2af3.
* stream: redo playback abort handlingwm42014-09-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mechanism originates from MPlayer's way of dealing with blocking network, but it's still useful. On opening and closing, mpv waits for network synchronously, and also some obscure commands and use-cases can lead to such blocking. In these situations, the stream is asynchronously forced to stop by "interrupting" it. The old design interrupting I/O was a bit broken: polling with a callback, instead of actively interrupting it. Change the direction of this. There is no callback anymore, and the player calls mp_cancel_trigger() to force the stream to return. libavformat (via stream_lavf.c) has the old broken design, and fixing it would require fixing libavformat, which won't happen so quickly. So we have to keep that part. But everything above the stream layer is prepared for a better design, and more sophisticated methods than mp_cancel_test() could be easily introduced. There's still one problem: commands are still run in the central playback loop, which we assume can block on I/O in the worst case. That's not a problem yet, because we simply mark some commands as being able to stop playback of the current file ("quit" etc.), so input.c could abort playback as soon as such a command is queued. But there are also commands abort playback only conditionally, and the logic for that is in the playback core and thus "unreachable". For example, "playlist_next" aborts playback only if there's a next file. We don't want it to always abort playback. As a quite ugly hack, abort playback only if at least 2 abort commands are queued - this pretty much happens only if the core is frozen and doesn't react to input.
* Revert "build: avoid defining _GNU_SOURCE"wm42014-07-101-3/+0
| | | | | | This reverts commit 2e6a8f260ca169e2e1a5646eecfc322de6f77307. Too many problems for now, such as with OSX and asprintf().
* build: avoid defining _GNU_SOURCEwm42014-07-091-0/+3
| | | | | | | | | _GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions where glibc and POSIX conflict. Even though POSIX is worth less than toilet paper, we still prefer the POSIX definitions. rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define _GNU_SOURCE too specifically for this file.
* stream: mp_msg conversionswm42013-12-211-3/+3
| | | | We also drop some slave mode stuff from stream_vcd.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Merge mp_talloc.h into ta/ta_talloc.hwm42013-12-171-1/+1
|
* Enable -Wshadowwm42013-11-011-3/+3
| | | | | | | | | This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.
* stream: add uncompressed rar supportwm42013-08-261-0/+454
Apparently, it is popular to store large files in uncompressed rar archives. Extracting files is not practical, and some media players suport playing directly from uncompressed rar (at least VLC and some DirectShow components). Storing or accessing files this way is completely idiotic, but it is a common practice, and the ones subjected to this practice can't do much to change this (at least that's what I assume/hope). Also, it's a feature request, so we say yes. This code is mostly taken from VLC (commit f6e7240 from their git tree). We also copy the way this is done: opening a rar file by itself yields a playlist, which contains URLs to the actual entries in the rar file. Compressed entries are simply skipped.