【zz】REVISED AVCODEC_SAMPLE.0.4.9.CPP

http://web.me.com/dhoerl/Home/Tech_Blog/Entries/2009/1/22_Revised_avcodec_sample.c.html

09年1月22日的

 

The FFMpeg project hosts two popular libraries that can be used to process video: libavcodec and libavformat. These two libraries are fairly complex, and thus Martin Boehm wrote a small demo app to get people started several years ago, named avcodec_sample.0.4.9.cpp There is a tutorial mentioned on Martin’s page that refers to a more detailed tutorial. Since Martin wrote avcodec_sample, it has undergone one revision (as the two libraries have changed over the years) by another coder (ryanfb). However, a key conversion routine, img_convert, was dropped from libavcodec a while ago, and even this code will not compile. Stephen Dranger provided directions on how to update the code in his tutorial, in lession 8. However, even with this information, it’s still not easy to get the sample code working (ask me how I know this!) Thus, I have applied all the various patches and updates, and now provide an update in the hope that this will help someone else (avcodec_sample.0.5.0.c). Note that the code is now C—the only real change was making a new/delete pair malloc/free and some additional header files. The code was compiled and run on a Macintosh Leopard system, using gcc version 4.0.

你可能感兴趣的:(【zz】REVISED AVCODEC_SAMPLE.0.4.9.CPP)