summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-17 00:55:26 +0200
committerwm4 <wm4@nowhere>2015-08-17 00:55:26 +0200
commit2b280f4522a288429253b396b778d60ed018312c (patch)
treeec76722ed42b8323fee962fa333d5e116784c2fb /wscript_build.py
parent00b60710cf5a290f1882472d51577f72795a3335 (diff)
downloadmpv-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 'wscript_build.py')
-rw-r--r--wscript_build.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index a96fb87540..dfe7650f3a 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -170,6 +170,7 @@ def build(ctx):
( "demux/demux_disc.c" ),
( "demux/demux_edl.c" ),
( "demux/demux_lavf.c" ),
+ ( "demux/demux_libarchive.c", "libarchive" ),
( "demux/demux_libass.c", "libass"),
( "demux/demux_mf.c" ),
( "demux/demux_mkv.c" ),
@@ -247,6 +248,7 @@ def build(ctx):
( "stream/stream_edl.c" ),
( "stream/stream_file.c" ),
( "stream/stream_lavf.c" ),
+ ( "stream/stream_libarchive.c", "libarchive" ),
( "stream/stream_memory.c" ),
( "stream/stream_mf.c" ),
( "stream/stream_null.c" ),