diff options
author | wm4 <wm4@nowhere> | 2015-08-17 00:55:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-17 00:55:26 +0200 |
commit | 2b280f4522a288429253b396b778d60ed018312c (patch) | |
tree | ec76722ed42b8323fee962fa333d5e116784c2fb /demux/demux.c | |
parent | 00b60710cf5a290f1882472d51577f72795a3335 (diff) | |
download | mpv-2b280f4522a288429253b396b778d60ed018312c.tar.bz2 mpv-2b280f4522a288429253b396b778d60ed018312c.tar.xz |
stream: libarchive wrapper for reading compressed archives
This works similar to the existing .rar support, but uses libarchive.
libarchive supports a number of formats, including zip and (most of)
rar.
Unfortunately, seeking does not work too well. Most libarchive readers
do not support seeking, so it's emulated by skipping data until the
target position. On backwards seek, the file is reopened. This works
fine on a local machine (and if the file is not too large), but will
perform not so well over network connection.
This is disabled by default for now. One reason is that we try
libarchive on every file we open, before trying libavformat, and I'm not
sure if I trust libarchive that much yet. Another reason is that this
breaks multivolume rar support. While libarchive supports seeking in
rar, and (probably) supports multivolume archive, our support of
libarchive (probably) does not. I don't care about multivolume rar, but
vocal users do.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c index 4c4a399c9f..7d66c56745 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -53,6 +53,7 @@ extern const demuxer_desc_t demuxer_desc_subreader; extern const demuxer_desc_t demuxer_desc_playlist; extern const demuxer_desc_t demuxer_desc_disc; extern const demuxer_desc_t demuxer_desc_rar; +extern const demuxer_desc_t demuxer_desc_libarchive; /* Please do not add any new demuxers here. If you want to implement a new * demuxer, add it to libavformat, except for wrappers around external @@ -71,6 +72,9 @@ const demuxer_desc_t *const demuxer_list[] = { &demuxer_desc_libass, #endif &demuxer_desc_matroska, +#if HAVE_LIBARCHIVE + &demuxer_desc_libarchive, +#endif &demuxer_desc_rar, &demuxer_desc_lavf, &demuxer_desc_mf, |