[Ffmpeg-devel] some quick questions about swscaler integration

Colin Ward lists
Sun Mar 19 04:04:32 CET 2006


M?ns Rullg?rd wrote:
>>

   [Snip]

> There may be files that implicitly make this assumption, but it is not a
> decided practise.  All files (*.c and *.h) #including everything they
> depend on makes for the least trouble in the long run.  If (unlikely)
> all dependencies on inttypes.h were removed from avcodec.h, someone might
> (rightly) decide to remove the #include <inttypes.h> from it.  This would
> break compilation of any file that depends on avcodec.h having this #include.
> 
> Some morons will tell you that header files should never #include other
> header files.  These people are hopelessly misguided and should be either
> ignored or shot.

   Ok, I'll bite.

   Maybe those hopelessly misguided morons have been badly bitten at 
some point by the dreaded circular dependency problem where header "a" 
required header "b" and header "b" required header "a" and they had to 
stuff around for ages trying to fix it.  I know that I have been bitten 
by that problem badly in the past, and I now try to forward declare as 
much as possible in header files in order to reduce the number of header 
files included, to avoid the possibility of these problems.  It 
certainly has made life easier and has not caused me any problems 
whatsoever.

   So why does that make me a hopelessly misguided moron?

-- 
/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





More information about the ffmpeg-devel mailing list