summaryrefslogtreecommitdiffstats
path: root/TOOLS
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 /TOOLS
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 'TOOLS')
-rwxr-xr-xTOOLS/old-configure3
-rw-r--r--TOOLS/old-makefile2
2 files changed, 5 insertions, 0 deletions
diff --git a/TOOLS/old-configure b/TOOLS/old-configure
index ada5ca7356..a4cc9d16a5 100755
--- a/TOOLS/old-configure
+++ b/TOOLS/old-configure
@@ -216,6 +216,7 @@ options_state_machine() {
opt_yes_no _lua "Lua scripting"
opt_yes_no _vapoursynth "VapourSynth filter bridge (Python)"
opt_yes_no _vapoursynth_lazy "VapourSynth filter bridge (Lua)"
+ opt_yes_no _libarchive "libarchive"
opt_yes_no _encoding "encoding functionality" yes
opt_yes_no _build_man "building manpage"
}
@@ -859,6 +860,8 @@ if test "$_vapoursynth" = no && test "$_vapoursynth_lazy" = no ; then
fi
check_trivial "VapourSynth core" $_vapoursynth_core VAPOURSYNTH_CORE
+check_pkg_config "libarchive support" $_libarchive LIBARCHIVE 'libarchive >= 3.0.0'
+
check_trivial "encoding" $_encoding ENCODING
# needs dlopen on unix
diff --git a/TOOLS/old-makefile b/TOOLS/old-makefile
index d36b013e21..4f5737595f 100644
--- a/TOOLS/old-makefile
+++ b/TOOLS/old-makefile
@@ -108,6 +108,8 @@ SOURCES-$(LIBAVFILTER) += video/filter/vf_lavfi.c \
SOURCES-$(LUA) += player/lua.c
SOURCES-$(VAPOURSYNTH_CORE) += video/filter/vf_vapoursynth.c
+SOURCES-$(LIBARCHIVE) += demux/demux_libarchive.c \
+ stream/stream_libarchive.c
SOURCES-$(DLOPEN) += video/filter/vf_dlopen.c
SOURCES = audio/audio.c \