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

Michael Niedermayer michaelni at gmx.at
Fri Jun 24 01:47:05 CEST 2011


On Thu, Jun 23, 2011 at 08:55:01PM +0400, Kirill Gavrilov wrote:
> 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?

* If you fix the existing technical issues (mentioned by reimar)
* Make sure the C++ side is tested by the reg tests
* maintain it


> Or there are some reasons (politics / religion) why these changes doesn't
> already included in FFmpeg project?

I dont like politics

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

Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110624/3f85815a/attachment.asc>


More information about the ffmpeg-devel mailing list