[FFmpeg-devel] [RFC] extern "C" usage
Mon May 14 14:31:22 CEST 2007
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.
mans at mansr.com
More information about the ffmpeg-devel