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

Aurelien Jacobs aurel
Tue Nov 7 01:59:26 CET 2006


On Tue, 07 Nov 2006 00:55:13 +0000
M?ns Rullg?rd <mru at inprovide.com> wrote:

> Aurelien Jacobs <aurel at gnuage.org> writes:
> 
> > On Sun, 5 Nov 2006 01:03:11 +0100
> > Aurelien Jacobs <aurel at gnuage.org> wrote:
> >
> >> 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 ?
> >
> > No comments ?
> > I guess it's ok. I will apply soon.
> 
> No.  It's still not clean.

Umm... Care to explain ?
This seems pretty clean to me...

Aurel




More information about the ffmpeg-devel mailing list