[FFmpeg-devel] [PATCH] Private options for url protocols
Stefano Sabatini
stefasab at gmail.com
Sat Nov 19 22:44:18 CET 2011
On date Saturday 2011-11-19 21:36:48 +0100, Michael Niedermayer encoded:
> On Tue, Nov 15, 2011 at 02:43:24PM +0100, Michael Niedermayer wrote:
> > On Tue, Nov 15, 2011 at 01:42:46AM +0100, Stefano Sabatini wrote:
> > > On date Thursday 2011-11-10 17:56:11 +0100, Michael Niedermayer encoded:
> > > > Hi
> > > >
> > > > Attached patchset implemets subj
> > > > Comments welcome, ill probably push it tomorrow if there are no
> > > > objections
> > > >
> > > > An example of how useage would look is:
> > > > ffplay http,user-agent=JustTesting://samples.multimedia.cx/MPEG2/test422.m2v
> > > >
> > > > the syntax would also work for nested protocols ...
> > > >
> > > > --
> > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > > >
> > > > No human being will ever know the Truth, for even if they happen to say it
> > > > by chance, they would not even known they had done so. -- Xenophanes
> > >
> > > > From d300a9c6a787827dbe2d86a1b330b8aba830bcc7 Mon Sep 17 00:00:00 2001
> > > > From: Michael Niedermayer <michaelni at gmx.at>
> > > > Date: Thu, 10 Nov 2011 17:02:02 +0100
> > > > Subject: [PATCH 1/2] avio: allow any chars in protocols
> > > >
> > > > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > > > ---
> > > > libavformat/avio.c | 6 +++---
> > > > 1 files changed, 3 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/libavformat/avio.c b/libavformat/avio.c
> > > > index 47b2d51..f08cbab 100644
> > > > --- a/libavformat/avio.c
> > > > +++ b/libavformat/avio.c
> > > > @@ -221,17 +221,17 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags)
> > > > {
> > > > URLProtocol *up;
> > > > char proto_str[128], proto_nested[128], *ptr;
> > > > - size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
> > > > + const char *proto_end = strchr(filename, ':');
> > >
> > > uhmm... what if you have ":" in the options? e.g.:
> > > ffplay http,user-agent=::the_bloody_user_agent::://samples.multimedia.cx/MPEG2/test422.m2v
> > >
> > > I still find the lack of defined namespaces for the options a big
> > > issue, but I can't say what would be a good way of setting this,
> > > maybe:
> > > -proto_opts=user_agent=... http://...
> > >
> > > yes that would be inconsistent...
> >
> > also theres the problem that protocols can be nested like
> > applehttp+http:...
> > we should be able to transfer options specifically to one
> are you ok if i commit the code with the unchanged syntax ?
> This way of passing options is mostly just relevant until the next
> ABI bump anyway. And i dont see a easy way to pass arbitrary strings
> nor do i see much need for it ...
Not being able of specifying arbitrary strings containing escaping
characters looks like a serious limitation to me, but if you say this
is just temporary I won't object in case you commit this. BTW do you
have an idea *where* we should document it?
--
FFmpeg = Fiendish Fabulous Mysterious Puritan Enigmatic Gigant
More information about the ffmpeg-devel
mailing list