【zz】REVISED AVCODEC_SAMPLE.0.4.9.CPP

本文介绍了FFMpeg项目中libavcodec和libavformat库的示例应用avcodec_sample的更新过程。由于原始代码中的关键函数img_convert已在libavcodec中移除,导致代码无法编译。作者结合RyanFB和Stephen Dranger的教程,对代码进行了修订,使其适应最新库的变化,并提供了avcodec_sample.0.5.0.c版本。该代码已使用Mac Leopard系统上的gcc 4.0成功编译和运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值