[FFmpeg-devel] [RFC] full paths in #include directives

Michael Niedermayer michaelni
Thu May 8 20:59:51 CEST 2008


On Thu, May 08, 2008 at 03:52:20PM +0200, Aurelien Jacobs wrote:
> Diego Biurrun wrote:
> 
> > I would like to propose using full paths in all #include directives in
> > FFmpeg, i.e.
> > 
> > #include "libavutil/common.h"
> > 
> > instead of
> > 
> > #include "common.h"
> > 
> > The reasons are manyfold:
> > 
> > 0) We already expect this from external users.
> > 
> > 1) Many header names are not at all unique.  The above-mentioned
> > common.h comes to mind, as do others.  Depending on the order of -I
> > flags the right header may or may not be included.
> > 
> > This has bitten me several times in MPlayer already.  We now use full
> > paths for FFmpeg #includes in MPlayer, but still -I flags are needed
> > so that the FFmpeg headers themselves can find their dependencies.
> > But with -Ilibavcodec on the gcc command line '#include <png.h>'
> > picks up the FFmpeg version instead of the libpng header.  Build
> > system kludges can work around this, but the system remains brittle,
> > future FFmpeg changes may necessitate more or updated kludges.
> > 
> > 2) The need for -I flags would be reduced internally as well as
> > externally.
> > 
> > 
> > Attached is an example patch for libpostproc.  If the idea is
> > accepted, I will do the rest of the work myself.
> 

> I like this proposal, but I would prefer if headers in the same
> directory don't use full path.

seconded

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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-devel/attachments/20080508/6df58ad6/attachment.pgp>



More information about the ffmpeg-devel mailing list