[Ffmpeg-devel] libavcodec help

Michael Niedermayer michaelni
Tue Nov 1 21:56:17 CET 2005


Hi

On Tue, Nov 01, 2005 at 09:35:59PM +0100, Antoine Cellerier wrote:
> On Tue, Nov 01, 2005, Michael Niedermayer wrote:
> > none
> > 
> > just write something like
> > 
> > switch(opt->type){
> > case FF_OPT_TYPE_FLAGS: str="<flags>"; break;
> > ...
> > }
> > av_log(..., str, ...)
> > 
> > or 
> > 
> > static const char *str[]= {
> >     [FF_OPT_TYPE_FLAGS] = "<flags>",
> > ...
> > }
> > av_log(..., str[opt->type], ...)
> 
> The problem with this method is that it doesn't look nice (at least it
> doesn't look as nice as the previous method) because you won't be able

disagree


> to specify a field width concerning the option's name + its type.

hmm, and why would anyone want that?

-bit_rate           <int>   E.VA.
-bit_rate_tolerance <int>   E.V..
-flags              <flags> EDVA.
-mv4                        E.V.. use four motion vector by macroblock (mpeg4)

looks better then:

-bit_rate <int>           E.VA.
-bit_rate_tolerance <int> E.V..
-flags <flags>            EDVA.
-mv4                      E.V.. use four motion vector by macroblock (mpeg4)


and yes we should do something about the too long names ...
i also think that it may be a good idea to shorten the type names, we are
already using too much horizontal space

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list