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

Anshul anshul.ffmpeg at gmail.com
Fri Mar 14 20:13:04 CET 2014



Michael Niedermayer <michaelni at gmx.at> wrote:
>On Fri, Mar 14, 2014 at 05:23:52PM +0100, Nicolas George wrote:
>> Le quartidi 24 ventôse, an CCXXII, Michael Niedermayer a écrit :
>> > People who want to use ffmpeg from C++ need examples which work in
>> > C++.
>> 
>> People who want to use ffmpeg from INTERCAL need examples that work
>in
>> INTERCAL, shall we make the examples INTERCAL-compatible too?
>
>if you can do it by changing 6 lines in the example and theres a
>significnat userbase, why not ?
>
>but i suspect neither is true for INTERCAL
>
>
>> 
>> INTERCAL is a ridiculous example, but the same applies to all
>languages that
>> are actually used, including java and PHP.
>
>same here, if we could make our examples be useable & valid for these
>by changing 6 lines and theres a significnat userbase ...
>java and PHP have a significnat user base but i dont think a long
>piece of C code would magically turn into PHP or java by chnaging
>6 lines
>
>
>> 
>> The casts you added are necessary in c++ but they are bad practice in
>C.
>> That makes the example weaker, as it no longer shows the best
>practices.
>
>We could add a comment that clarifies that the casts are bad practice
>in C but needed to support C++
>
>
>> 
>> There are certainly dozens of tutorials on how to get C code to build
>as
>> c++, explaining just what you did with the examples. And actually,
>this is
>> basic programming skill: someone who does not have it should probably
>not
>> try something as hard as multimedia processing yet.
>
>
>> 
>> I am not against a pure c++ example, but making the C examples less
>readable
>> and getting them to show bad practice is IMHO a very bad idea.
>
>do you volunteer to maintain a seperate set of
>examples for C++.
>I would have thought that having the same example code usable for
>both languages would be the overall better solution
>

I would like to volunteer, give me sometime I will soon send patch for c++.
If peoples are intrested for example in different language I can also send 
Python examples.

>but iam happy with anything people prefer, the only thing that iam
>not happy about is if the average C++ programmer cant use the examples
>and that then is only because of 6 lines of code and some
>philosophical reasons
>
>[...]

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the ffmpeg-devel mailing list