VC2008编译FFmpeg

来源:互联网 发布:我的世界0.14.0家具js 编辑:程序博客网 时间:2024/06/08 17:50

  由于VC不支持C99,需拷贝2个文件去替换VC的原始文件。

        下载inttypes.h stdint.h,替换C:\Program Files\Microsoft Visual Studio 9.0\VC\include下同名文件。


stdint.h:

[cpp] view plain copy print?
  1.   
[cpp] view plain copy print?
  1. // stdint.h  
  2.   
  3. typedef char    int8_t;  
  4. typedef unsigned char  uint8_t;  
  5. typedef short    int16_t;  
  6. typedef unsigned short  uint16_t;  
  7. typedef int     int32_t;  
  8. typedef unsigned int  uint32_t;  
  9. typedef __int64    int64_t;  
  10. typedef unsigned __int64 uint64_t;  
  11.   
  12.   
  13. #define INT8_C(val)  val##i8  
  14. #define INT16_C(val) val##i16  
  15. #define INT32_C(val) val##i32  
  16. #define INT64_C(val) val##i64  
  17.   
  18. #define UINT8_C(val)  val##ui8  
  19. #define UINT16_C(val) val##ui16  
  20. #define UINT32_C(val) val##ui32  
  21. #define UINT64_C(val) val##ui64  
  22.   
  23.   
  24. #define PRId64       "I64d"  
  25. #define PRIi64       "I64i"  
  26. #define PRIdLEAST64  "I64d"  
  27. #define PRIiLEAST64  "I64i"  
  28. #define PRIdFAST64   "I64d"  
  29. #define PRIiFAST64   "I64i"  
  30.   
  31. #define PRIdMAX     "I64d"  
  32. #define PRIiMAX     "I64i"  
  33.   
  34. #define PRIdPTR     "Id"  
  35. #define PRIiPTR     "Ii"  
[cpp] view plain copy print?
  1.   
[cpp] view plain copy print?
  1. <span style="color: rgb(0, 0, 255);">#define</span> INT8_MIN     ((int8_t)_I8_MIN)  
  2. <span style="color: rgb(0, 0, 255);">#define</span> INT8_MAX     _I8_MAX  
  3. <span style="color: rgb(0, 0, 255);">#define</span> INT16_MIN    ((int16_t)_I16_MIN)  
  4. <span style="color: rgb(0, 0, 255);">#define</span> INT16_MAX    _I16_MAX  
  5. <span style="color: rgb(0, 0, 255);">#define</span> INT32_MIN    ((int32_t)_I32_MIN)  
  6. <span style="color: rgb(0, 0, 255);">#define</span> INT32_MAX    _I32_MAX  
  7. <span style="color: rgb(0, 0, 255);">#define</span> INT64_MIN    ((int64_t)_I64_MIN)  
  8. <span style="color: rgb(0, 0, 255);">#define</span> INT64_MAX    _I64_MAX  
  9. <span style="color: rgb(0, 0, 255);">#define</span> UINT8_MAX    _UI8_MAX  
  10. <span style="color: rgb(0, 0, 255);">#define</span> UINT16_MAX   _UI16_MAX  
  11. <span style="color: rgb(0, 0, 255);">#define</span> UINT32_MAX   _UI32_MAX  
  12. <span style="color: rgb(0, 0, 255);">#define</span> UINT64_MAX   _UI64_MAX  
[cpp] view plain copy print?
  1.   

 inttypes.h:

[cpp] view plain copy print?
  1. // inttypes.h  



设置引用库:

avcodec.lib
avdevice.lib
avfilter.lib
avformat.lib
avutil.lib
postproc.lib
swresample.lib
swscale.lib




FFmpeg官网:http://ffmpeg.org

官方文档:http://ffmpeg.org/ffmpeg.html

软件下载:http://ffmpeg.org/download.html#releases

源码下载:Git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

Windows平台软件、开发包下载

32位:http://ffmpeg.zeranoe.com/builds/win32/

64位:http://ffmpeg.zeranoe.com/builds/win64/


[总结]FFMPEG视音频编解码零基础学习方法 

最简单的基于FFMPEG的封装格式转换器(无编解码)

FFmpeg源代码简单分析:常见结构体的初始化和销毁(AVFormatContext,AVFrame等)

FFmpeg获取DirectShow设备数据(摄像头,录屏)

FFmpeg发送流媒体的命令(UDP,RTP,RTMP)

ffmpeg.c函数结构简单分析(画图)



0 0