[FFmpeg-devel] [PATCH] Make long_names definition conditional depending on CONFIG_SMALL

Stefano Sabatini stefano.sabatini-lala
Thu May 29 18:17:31 CEST 2008


On date Thursday 2008-05-29 17:27:59 +0200, Michael Niedermayer encoded:
> On Thu, May 29, 2008 at 04:56:54PM +0200, Reimar D?ffinger wrote:
> > On Thu, May 29, 2008 at 04:50:54PM +0200, Stefano Sabatini wrote:
> > > -    const char *long_name;                  ///< descriptive name for the codec, meant to be more human readable than \p name
> > > +    /**
> > > +     * descriptive name for the codec, meant to be more human readable than \p name
> > > +     * You \e should use the CODEC_REGISTER_LONG_NAME() macro to define it.
> > > +     */
> > > +    const char *long_name;
> > >      const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
> > >  } AVCodec;
> > >  
> > > +#ifdef CONFIG_SMALL
> > > +#define REGISTER_CODEC_LONG_NAME(long_name_) \
> > > +    .long_name = NULL
> > > +#else
> > > +#define REGISTER_CODEC_LONG_NAME(long_name_) \
> > > +    .long_name = long_name_
> > > +#endif
> > 
> > Macro name does not match above description. Also I think the "REGISTER"
> > in the name does not make sense, it does not register anything.
> > I would find e.g. FF_CODEC_LONG_NAME better.
> 
> what about
> #ifdef CONFIG_SMALL
> #   define NULL_IF_CONFIG_SMALL(x) NULL
> #else
> #   define NULL_IF_CONFIG_SMALL(x) x
> #endif

Yes, I prefer this since the same macro may be used in libavformat and
other places as well, but maybe then should it be defined in
libavutil?

Regards.
-- 
FFmpeg = Foolish & Foolish MultiPurpose Earthshaking Game




More information about the ffmpeg-devel mailing list