From 2b280f4522a288429253b396b778d60ed018312c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Aug 2015 00:55:26 +0200 Subject: 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. --- TOOLS/old-configure | 3 +++ TOOLS/old-makefile | 2 ++ 2 files changed, 5 insertions(+) (limited to 'TOOLS') 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 \ -- cgit v1.2.3