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

Michael Niedermayer michaelni at gmx.at
Fri Mar 14 22:42:14 CET 2014


On Sat, Mar 15, 2014 at 12:44:37AM +0530, Anshul wrote:
> 
> 
> 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++.

volunteer to add C++ support to existing examples or to maintain
seperate C++ examples ?


> If peoples are intrested for example in different language I can also send 
> Python examples.

sounds interresting


> 
> >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.
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140314/72580396/attachment.asc>


More information about the ffmpeg-devel mailing list