[FFmpeg-devel] [PATCH] lavf: add zip protocol
lukasz.m.luki2 at gmail.com
Sat Mar 28 23:30:04 CET 2015
W dniu sobota, 28 marca 2015 Peter Ross <pross at xvid.org> napisał(a):
> On Sat, Mar 28, 2015 at 08:38:40PM +0100, Lukasz Marek wrote:
> > I assumed it is local file (no other option so far). So I stat full path
> > (/tmp/outer.zip/tmp/inner.zip/tmp/data.bin) for being a file, if so then
> > opened it as zip file and used fallback to open first file.
> > If not then I stat by path components: /tmp/, /tmp/outer.zip, and so
> > /tmp/outer.zip is a file so I open it and treat rest of the uri as a path
> > inside zip.
> walking the path means that the archive protocol must know about the
> syntax of the underlying protocol (file, http, ftp, etc.). that seems
> also inefficient if you have got to walk a long ftp path.
I think filesystem looks the same on every server, no matter it is http,
ftp or any other server.
wouldn't we be better off defining a special character that seperates the
> path from the inner path. obviously we'd need some way of escaping the
> if it is legitimately part of either path.
In real life you might assume that archive has extension zip, rar,
7z,... and try to open according to it in first try, if user has archive
with "ass" extension in directory called "data.zip" then they have to wait.
i really would avoid to escape anything. this is just annoying. i remember
i used to escape urls with so many ifs, if file then dont escape, if http
then escape, and so on. handling archives with its own escapes is kinda
stupid. it would be easier just to add an option to pass inner file.
More information about the ffmpeg-devel