[FFmpeg-devel] [PATCH] Add AV_CONFIG_* for libav* libs to libavutil/avconfig.h

Stefano Sabatini stefano.sabatini-lala
Sat Mar 6 13:28:58 CET 2010


On date Saturday 2010-03-06 00:07:16 +0000, M?ns Rullg?rd encoded:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
[...]
> I've thought about this, and I've come to the conclusion that it's the
> wrong approach.
> 
> libavutil/avconfig.h is meant to contain system invariants determined
> by configure, e.g. machine byte order.  It is not the proper place to
> indicate whether or not the other libs were installed.
> 
> Consider a completely separate application.  To check for a library,
> one naturally runs a test in a configure script.  Expecting a
> different library to provide the answer feels strange to me.  To find
> out whether libvorbis is installed, you do not include libogg.h.
> 
> The ff* apps are in a special situation in that they are considered
> external to the libav* libraries, and thus must use only public the
> API, while still sharing configure script and makefiles.  This is not
> a problem at all in my opinion.  The config.h file we create does in
> no way depend on internals of the libraries.  It is therefor not wrong
> of ffmpeg.c et al to #include config.h.  If they were built separately
> from the libs, there would still be a configure script creating a very
> similar config.h.

I agree, so back to the original patch.

> What we should _not_ be doing is defining HAVE_AV_CONFIG_H when
> compiling ffmpeg.c.  That would expose internals which we should not
> be touching.

+1
-- 
FFmpeg = Friendly and Formidable MultiPurpose EniGma



More information about the ffmpeg-devel mailing list