由于VC不支持C99,需拷贝2个文件去替换VC的原始文件。
下载inttypes.h stdint.h,替换C:\Program Files\Microsoft Visual Studio 9.0\VC\include下同名文件。
stdint.h:
// stdint.h
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
#define PRId64 "I64d"
#define PRIi64 "I64i"
#define PRIdLEAST64 "I64d"
#define PRIiLEAST64 "I64i"
#define PRIdFAST64 "I64d"
#define PRIiFAST64 "I64i"
#define PRIdMAX "I64d"
#define PRIiMAX "I64i"
#define PRIdPTR "Id"
#define PRIiPTR "Ii"
<span style="color: rgb(0, 0, 255);">#define</span> INT8_MIN ((int8_t)_I8_MIN)
<span style="color: rgb(0, 0, 255);">#define</span> INT8_MAX _I8_MAX
<span style="color: rgb(0, 0, 255);">#define</span> INT16_MIN ((int16_t)_I16_MIN)
<span style="color: rgb(0, 0, 255);">#define</span> INT16_MAX _I16_MAX
<span style="color: rgb(0, 0, 255);">#define</span> INT32_MIN ((int32_t)_I32_MIN)
<span style="color: rgb(0, 0, 255);">#define</span> INT32_MAX _I32_MAX
<span style="color: rgb(0, 0, 255);">#define</span> INT64_MIN ((int64_t)_I64_MIN)
<span style="color: rgb(0, 0, 255);">#define</span> INT64_MAX _I64_MAX
<span style="color: rgb(0, 0, 255);">#define</span> UINT8_MAX _UI8_MAX
<span style="color: rgb(0, 0, 255);">#define</span> UINT16_MAX _UI16_MAX
<span style="color: rgb(0, 0, 255);">#define</span> UINT32_MAX _UI32_MAX
<span style="color: rgb(0, 0, 255);">#define</span> UINT64_MAX _UI64_MAX
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源代码简单分析:常见结构体的初始化和销毁(AVFormatContext,AVFrame等)
FFmpeg获取DirectShow设备数据(摄像头,录屏)