[MPlayer-dev-eng] [PATCH] demux_lavf: add urlprefix suboption.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Apr 9 22:24:00 CEST 2013


On 07.04.2013, at 19:07, Nicolas George <nicolas.george at normalesup.org> wrote:

> Setting it to an empty string may be necessary when using
> special formats that use the given URL or file name as a
> base path for other files.
> 
> Change the option parser to accept empty strings if
> M_OPT_MIN is set and min = 0.
> ---
> DOCS/man/en/mplayer.1   |    5 +++++
> libmpdemux/demux_lavf.c |    5 +++++
> m_option.c              |    2 ++
> 3 files changed, 12 insertions(+)
> 
> diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
> index d424589..c59c784 100644
> --- a/DOCS/man/en/mplayer.1
> +++ b/DOCS/man/en/mplayer.1
> @@ -11753,6 +11753,11 @@ of TS packets to scan.
> Encryption key the demuxer should use.
> This is the raw binary data of the key converted to a hexadecimal string.
> .
> +.TP
> +.B urlprefix=string
> +Prefix prepended to URL passed to libavformat.
> +The default is "mp:".

I don't see a point in making it configurable.
In addition don't we already remove the prefix in cases where we know we have to?
The idea behind it was that libavformat would call back to the stream layer so that caching, stream dumping etc. would be working.
Unfortunately quite a few demuxers nowadays are designed after the principle "who needs such things as caches or proper layering in software", so that is probably unrealistic, but I don't like too much hacks that both will not work automatically nor encourage better design.
That said if you want it, I'd suggest a bool option described something like "allow FFmpeg to access file directly". I admit I didn't think it through too well though.


More information about the MPlayer-dev-eng mailing list