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

Måns Rullgård mru
Sat Nov 4 19:00:27 CET 2006


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.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list