[FFmpeg-devel] [RFC] extern "C" usage

François Revol revol
Mon May 14 15:49:53 CEST 2007


> Rich Felker <dalias at aerifal.cx> writes:
> 
> > On Sun, May 13, 2007 at 04:35:26PM +0200, Alex Beregszaszi wrote:
> >> Hi,
> >> 
> >> some headers are enclosed into extern "C" { }, while others are 
> > > not.
> >> Such is aes.h.
> >> 
> >> When using ffmpeg libs in a C++ application this brings a 
> > > confusion, as
> >> you need to enclose some headers with it, while others not.
> >> 
> >> To solve this, I propose to remove all the extern "C" occurances 
> > > in
> >> FFmpeg and let this job be done by the developers of C++ 
> > > applications.
> >> The other solution would be adding these to the headers which are
> >> missing it.
> >
> > I agree strongly with emoving them but I suspect this is
> > controversial. C++ users do not like being reminded that using C
> > libraries is a form of FFI and not native C++
> 
> But we never cared about C++ users, did we?  If I'm mistaken, and we

*you* never cared.

> do, it's about time we stopped.  I propose using a few C++ keywords
> like new or class in the headers too.  That should teach them.

How nice of you...

May I remind you there is at least one C++ file in ffmpeg.
For the BeOS port. 
Oh wait the BeOS build is still broken anyway, but you know that 
already, 
don't you. 
Someone should submit a DOS port to teach you... 

Fran?ois.
Not ready to port BeOS to ffmpeg.





More information about the ffmpeg-devel mailing list