[FFmpeg-devel] [PATCH] doc/examples/muxing: make compatible with C++

anshul anshul.ffmpeg at gmail.com
Tue Mar 18 11:42:49 CET 2014


On 03/18/2014 12:28 AM, Stefano Sabatini wrote:
> On date Friday 2014-03-14 17:15:23 +0100, Michael Niedermayer encoded:
>> On Fri, Mar 14, 2014 at 10:17:16AM +0100, Stefano Sabatini wrote:
>>> On date Thursday 2014-03-13 23:10:40 +0100, Clément Bœsch encoded:
>>>> On Thu, Mar 13, 2014 at 06:03:49PM +0100, Michael Niedermayer wrote:
>>> [...]
>>>> I don't think supporting examples compilation with g++ is worth the
>>>> effort. Actually, I believe it's harmful because people doing C will start
>>>> copying naive/broken/c++ patterns (are you going to cast malloc() return
>>>> values too?).
>>> +1, we decided FFmpeg was C and we shouldn't try to make half-baked
>>> attempts at pretending it is C++ or the next looks-almost-like-c
>>> thing.
>> this patch doesnt change ffmpeg, it changes the examples.
>>
>> People who want to use ffmpeg from C++ need examples which work in
>> C++.
>> ive written that patch in response to a question of how to do what
>> muxing.c does from C++ as it didnt build even with extern C and the
>> error messages truly where not helpfull in figuring out what was
>> the cause.
> We have this page:
> http://trac.ffmpeg.org/wiki/Including%20FFmpeg%20headers%20in%20a%20C%2B%2B%20application
>
> We could extend the page, probably rename it, add more comments about
> using FFmpeg from C++ and link it from the README (which we should
> rename DONTREADME so people would actually read it).
>
> As it is the patch is half baked, because:
>
> 1. it is not written anywhere that examples can be directly converted
> to C++ code
> 2. the preprocessor hack is only adopted in muxing.c, ignoring all the
> other C examples.
Hi

Here is patch attached for cpp examples files.

Please report if they fail to compile or do there intended job.


Thanks
Anshul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-added-examples-in-cpp.patch
Type: text/x-patch
Size: 169743 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140318/c5306400/attachment.bin>


More information about the ffmpeg-devel mailing list