[Ffmpeg-devel] [PATCH] add ENABLE_ defines along with CONFIG_

Aurelien Jacobs aurel
Sun Nov 5 01:03:11 CET 2006


On Sat, 04 Nov 2006 18:00:27 +0000
M?ns Rullg?rd <mru at inprovide.com> wrote:

> Aurelien Jacobs <aurel at gnuage.org> writes:
> 
> > Hi,
> >
> > The attached patch generate ENABLE_ defines for every codec/format/parser
> > along with the CONFIG_ defines in config.h.
> > Those new ENABLE_ defines are always defined, either to 1 when the feature
> > is enabled or to 0 when it's disabled.
> > It allows to write this:
> >
> >   if (ENABLE_DVVIDEO_DECODER) {
> >     [...]
> >   }
> >
> > instead of this:
> >
> > #ifdef CONFIG_DVVIDEO_DECODER
> >     [...]
> > #endif
> >
> > Here are the advantages as I already explained in my previous mail
> > about "ifdef dv in avi container":
> >  - smaller source code
> >  - less ugly #ifdef mess
> >  - the compiler can still parse and check for errors in the
> >    DV only sections before optimizing them out
> >
> > Ok to apply ?
> 
> I think it could be achieved with less code duplication in configure.

I guess you mean something like the attached patch ?
Ok to apply ?

Aurel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config-enable.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061105/6f0cea65/attachment.txt>



More information about the ffmpeg-devel mailing list