[FFmpeg-devel] [PATCH/RFC] Per-codec option system

Ronald S. Bultje rsbultje
Wed Sep 30 22:23:31 CEST 2009


On Wed, Sep 30, 2009 at 4:11 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Sep 30, 2009 at 09:04:00PM +0200, Stefano Sabatini wrote:
>> The trick here is to find some way to tell av_set_option() to look for
>> an option in the private context of the codec, then eventually to
>> check then in the global shared context if the option is not found
>> there,
> one way:
> ? ?ret= av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o);
> + ? if(ret<0 && avcodec_opts[CODEC_TYPE_VIDEO]->codec->priv_class)
> + ? ? ? ret= av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO]->priv_data, opt+1, arg, 1, &o);

This is what I intended as well, I didn't see the options were already
in AVClass (well done!) but that is more than enough to kick this off.
I just talked to Jason, I think he likes this also (?) and I'll try
and see if I can write a patch that implements this for one option +
documents how to do it for more.


More information about the ffmpeg-devel mailing list