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

Alexander Strasser eclipse7 at gmx.net
Sun Mar 16 23:12:51 CET 2014


On 2014-03-16 21:18 +0100, Michael Niedermayer wrote:
> On Sun, Mar 16, 2014 at 08:58:03PM +0100, Michael Niedermayer wrote:
> > On Sun, Mar 16, 2014 at 08:00:50PM +0100, Nicolas George wrote:
> > > Le quartidi 24 ventôse, an CCXXII, Michael Niedermayer a écrit :
> > > > We could add a comment that clarifies that the casts are bad practice
> > > > in C but needed to support C++
> > > 
> > > What about the other way around: add comments about the required changed to
> > > make it compatible with c++, but keep the actual code pure C?
> > 
> > adding comments doesnt turn "not compiling code" into "compiling code"

  I agree with Michael doing it this way is not good at all.
Maybe doing it the other way around and adding comments that
explain what is added too compile as C++ would be acceptable.

  (Sorry, if this was already said in a previous mail in this thread.)

> > We or well at least I dont want to inconvenience our users
> > Examples that can be build out of the box as C and C++ are a lot
> > more convenient than examples that differ in 6 lines of code and
> > build just with a C compiler and then somewhere there are comments
> > explaining the modifications neccessary to make them build with C++.
> > (which arent easily regression testable btw ...)
> > A C++ developer who tries to use the code in a C++ application maybe
> > wont even find these comments.
> > Thats a big disadvantage for her. Can you elaborate on what the
> > advantage of having it "not work with C++" is ?
> > 
> > Iam a bit surprised by the negative reaction toward this patch
> > we accepted far worse to make ffmpeg work on obscure platforms.

  I am a little bit surprised too.

> > Also for example see "Patch: Inline asm fixes for Intel compiler on Windows"
> > do you consider that patchset clean and a good idea while this here
> > is ugly and bad and problematic?
> 
> also if people hate it so much, maybe we could include the patch
> and create a muxing.cpp via makefile from it and muxing.c ?
> would that resolve peoples concerns ?

  I didn't reason very deeply about this. Probably it would be a
possibility. Sounds rather like overkill to me.

  Also I do not like the idea that one is not able to just browse
the sources online or in a downloaded source archive, not being
able to just copy example code without executing make/patch.


  Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140316/fcc684b2/attachment.asc>


More information about the ffmpeg-devel mailing list