[FFmpeg-devel] Inhibit C++ name-mangling for FFmpeg public API

Kirill Gavrilov gavr.mail at gmail.com
Thu Jun 23 18:55:01 CEST 2011


Hi,

many C-libraries follow C++ friendly style for their public headers and
define constructions like this:
/* Inhibit C++ name-mangling for libavutil functions */
#ifdef __cplusplus
extern "C" {
#endif

... library functions ...

#ifdef __cplusplus
}
#endif
Such defines allows to include C-headers into C++ project without ugly
declarations like that:
extern "C" {
   #include <libavutil/avutil.h>
}
This will simplify including FFmpeg in C++ projects and will eliminate
common mistakes (especially by newbes).

Is it OK if I prepare the patch that will use this technique?
Or there are some reasons (politics / religion) why these changes doesn't
already included in FFmpeg project?
-----------------------------------------------
Kirill Gavrilov,
Software designer.


More information about the ffmpeg-devel mailing list