[Ffmpeg-devel] privatizing FifoBuffer into libavutil -- take II

Rich Felker dalias
Thu Sep 21 03:29:12 CEST 2006


On Wed, Sep 20, 2006 at 06:14:25PM -0700, Roman Shaposhnick wrote:
> > also it would be interresting to make the various parts of libavutil
> > conditional based on configure switches and actual need, for example
> > the md5 stuff could be skiped if no format and codec needs it and
> > the user doesnt explicitly ask for it either ... of course thats
> > off topic and seperate i know ...
> 
>   Modularity is high on my list as well. I also would like to explore
> the opportunity of actually querying for compiler feature(s) instead of
> doing #ifdef __GNUC__ all over the place. But more on that later.

Very good idea. I hate compiler/OS/etc-specific #ifdef. Let it grow
and fester for a few years and what you end up with is:

#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
#if (defined(sun) && defined(SVR4) && defined(GETUTENT)) || defined(HAVE_UTEMPTER)
#if !defined(sun) && !defined(B43) && !defined(ISC) && !defined(pyr) && !defined(_CX_UX)
#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux)
# if defined(__osf__) || (BSD >= 199103) || defined(ISC)
# if defined(BSD) && defined(TIOCSCTTY) && !defined(__GNU__)
...

Yes, this is all REAL CODE from "screen".... :(

Rich





More information about the ffmpeg-devel mailing list