[FFmpeg-cvslog] r14484 - in trunk/libavcodec: audioconvert.c audioconvert.h

Michael Niedermayer michaelni
Thu Jul 31 20:01:51 CEST 2008


On Thu, Jul 31, 2008 at 07:47:05PM +0200, Michael Niedermayer wrote:
> On Thu, Jul 31, 2008 at 01:11:14PM -0400, compn wrote:
> > On Thu, 31 Jul 2008 16:32:20 +0200, Aurelien Jacobs wrote:
> > >Not only unnecessary, but even bad.
> > >The usage here is that every file must include every headers that it
> > >requires directly. You should not rely on one header including another
> > >(except when it's explicitely documented so, such as inttypes.h
> > >including stdint.h).
> > >So here you should add back the avcodec.h include.
> > 
> > is this policy documented somewhere?
> 
> it has not even been discussed or agreed upon yet ...
> 
> Besides maybe we can make the converter independant of avcodec.h
> Which seems better either way ...

and just to repeat my view on the headers inclusion
IMHO headers should NOT include other headers, this nicely avoids such
problems ...
And iam not suggesting above as a strict always to follow rule, but rather
a strong suggestion. There may be situations where a #include in a header
makes sense but here as long as SAMPLE_FMT* is in avcodec.h.
Any user of audioconvert.c will need to include avcodec.h. Having 
audioconvert.h include it as well will just confuse people.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080731/ff4d7625/attachment.pgp>



More information about the ffmpeg-cvslog mailing list