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

Michael Niedermayer michaelni
Thu Feb 22 19:04:22 CET 2007


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 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070222/3fa3421f/attachment.pgp>



More information about the ffmpeg-devel mailing list