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

Nicolas George george at nsup.org
Thu Mar 13 19:12:54 CET 2014


Le tridi 23 ventôse, an CCXXII, Michael Niedermayer a écrit :
> The user uses an example in his application, its sort of the purpose
> of the examples to be used by "users" in their applications
> 
> this application may be C++ code

It may be java or objc.

It all boils down to whether we consider examples to be code ready-to-paste
in another application or code showing the best practices of the API in the
most readable way.

IMHO, the first version is not reasonable: a real-world application would
need error handling smarter than 'printf("something went wrong\n");
exit(1);", user interaction, etc. The few changes needed to make C compile
as c++ are negligible in front of that.

And the changes make the code less readable, defeating the second purpose
"best practices in the most readable way".

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140313/e39eca2b/attachment.asc>


More information about the ffmpeg-devel mailing list