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

Steve Lhomme slhomme
Mon May 14 16:31:41 CEST 2007

M?ns Rullg?rd wrote:
> Steve Lhomme wrote:
>> Ulrich von Zadow wrote:
>>> Diego Biurrun schrieb:
>>>> Since the big outcry has not been forthcoming this time around
>>> That's an invitation ;-).
>>>> and a
>>>> consensus to remove them seems to exist, I would say remove them.  I'm
>>>> all for it.
>>> I'm not an ffmpeg developer, but someone who has been using ffmpeg in
>>> open source sw (www.libavg.de) for quite some time. So, it's your choice
>>> whether to remove this code, but I'd like to add my 2c to the discussion:
>>> At the moment, it's no harder to use ffmpeg from C++ than it is from C
>>> (We're doing it), and that's very good. Removing the extern "C" markings
>>> would change that. It would remove maybe 20 lines from ffmpeg and
>>> require every library that uses ffmpeg from C++ to add these lines
>>> again. That's a lot of duplicated code and hence wasted effort.
>> My 2 additional cents: in general in C++ you should not put the extern
>> "C" around your includes. After all the same header file could have both
>> C calling convention and C++ ones. Only the person/group who created the
>> .h file know that. And it shouldn't be the job of the 3rd party to find
>> out if it's correct to assume everything is C. It's just extra work and
>> the creator of the software knows better than anyone else.
> If you don't know FFmpeg well enough to be certain it's 100% pure C, you
> shouldn't be using it in the first place.

I guess that's a perfect example of elitism.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: slhomme.vcf
Type: text/x-vcard
Size: 131 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070514/e8b40ae5/attachment.vcf>

More information about the ffmpeg-devel mailing list