[Ffmpeg-devel] [PATCH] access all bitrates for amr nb encoding

Benoit Fouet benoit.fouet
Fri Feb 23 09:52:58 CET 2007


Hi,

Michael Niedermayer wrote:
> Hi
>
> On Thu, Feb 22, 2007 at 05:53:37PM +0100, Benoit Fouet wrote:
>   
>> Hi,
>>
>> Benoit Fouet wrote:
>>
>> [snip]
>>     
>>>>>> then at appropriate places in the code the stuff from
>>>>>> avctx_opts/avformat_opts is copied into the actual contexts
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>         
>>>>>>             
>>>>> this is what i still have problems to see how is done...
>>>>> and i guess i have to understand if i want to split it correctly (and do
>>>>> things at their right places too)
>>>>>     
>>>>>       
>>>>>           
>>>> just grep for avctx_opts and replace it by avctx_opts[codec_type which looks
>>>> appropriate]
>>>>
>>>>
>>>>   
>>>>     
>>>>         
>>> i'm doing something like that at the moment... i'll get back when i get
>>> all this working correctly (i mean, at least regression tests (which
>>> have just finished successfully) and a bench of tests i have too)
>>>
>>>   
>>>       
>> well... i guess i missed something again...
>> how can we know we have to fill only "audio / video / whatever" options
>> in avctx_opts[codec_type] ?
>> i mean, do i have to split opt_default function too ? or is there
>> something i completely missed about default option management ?
>>     
>
> my idea was:
>
>     for(i=0; i<CODEC_TYPE_NB; i++)
>         o=av_set_string(avctx_opts[i], opt, arg);
>     if(!o)
>         o= av_set_string(avformat_opts, opt, arg);
>     if(!o){
>         if(opt[0] == 'a')
>             o= av_set_string(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg);
>         else if(opt[0] == 'v')
>             o= av_set_string(avctx_opts[CODEC_TYPE_VIDEO], opt+1, arg);
>     }
>     if(!o)
>         return -1;
>
> but i do not know if this will work ...
>
> [...]
>   
>   
oh... ok !
i was trying to come out with something more "general" (and failed to it
at the moment...)
i'll try that today...

Ben





More information about the ffmpeg-devel mailing list