[FFmpeg-devel] [PATCH] http: add user_agent option.

Clément Bœsch ubitux at gmail.com
Sun Nov 6 01:01:06 CET 2011


On Thu, Sep 29, 2011 at 01:07:16AM +0200, Stefano Sabatini wrote:
> On date Wednesday 2011-09-28 21:07:12 +0200, Clément Bœsch encoded:
> > ---
> > Hi :)
> > 
> > I'm not able to actually test this patch; the option parsing looks broken (or
> > I'm doing something wrong):
> > 
> > ./ffplay -user-agent
> > → missing argument, ok
> > 
> > ./ffplay -user-agent foobar
> > → Unrecognized option 'user-agent'
> >   Failed to set value 'foo' for option 'user-agent'
> >
> >   Why unrecognized here?
> > 
> > ./ffplay -user-agent foobar http://example.org
> > → Unrecognized option 'user-agent'
> >   Failed to set value 'foobar' for option 'user-agent'
> > 
> >   Doesn't seem to help.
> 
> user-agent is a protocol option, right now it is not possible to set
> protocol options (check cmdutils.c:opt_default). Don't ask me why though...

FYI, I asked Martin Storsjö the other day about this (since he had the
only commits introducing options in protocols), and this came out:

    <ubitux> wbs: 4167ba0bc8d38db335dcac0f49d25c192748af51 and 6e4f70a8de69884ce0caa8735d7a88915b4391d4 introduces both options for protocols (it seems they are the only options in protocols)
    <ubitux> but how did you test them?
    <wbs> ubitux: those options aren't settable from the main avconv/ffmpeg program, but when you open such protocols within libavformat, you can do a lower level open with ffurl_alloc, set options, then finish the open with ffurl_connect
    <ubitux> ok
    <ubitux> any reason it's not settable from the tools?
    <wbs> it's not hooked up yet
    <wbs> it's not dead simple to do, but requires a bit of touchups in the frameworks, elenril is working on it
    <ubitux> why so? is it so much different from the (de)muxers and codecs?
    <wbs> yes, you normally just do avformat_input_open() or something, that opens an aviocontext, that opens an urlcontext (in most cases) - it's currently only hooked up to the context+privdata level, but not through the avio layer
    <ubitux> ok
    <wbs> there's nothing that's "impossible" or so. it's just a bit of work that isn't done yet simply

So I guess I'll just wait for the protocol options (since it seems to
already be a WIP) to be available for the tools to raise this patch again.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111106/2fdce9f9/attachment.asc>


More information about the ffmpeg-devel mailing list