ffmpeg库移植到vc下需要的步奏
来源:互联网 发布:蚂蜂窝连app接不到网络 编辑:程序博客网 时间:2024/05/22 15:21
在VC下使用FFMPEG编译好的库,不仅仅是把.h,.lib,.dll拷贝到工程中就行了,还需要做以下几步。(此方法适用于自己使用MinGW编译的库,也同样适用于从网上下载的编译好的库,例如http://ffmpeg.zeranoe.com/builds/)。
(1)像其他额外库一样,设置VC的Include路径为你c:\msys\local\include,设置VClib路径为次c:\msys\local\bin,增加操作系统的一个Path c:\msys\local\bin(这一步好像不是必须的)。
(2)将mingw安装目录下的include的inttypes.h,stdint.h,_mingw.h三个文件拷到你ffmpeg库的目录下的include
(3)在_mingw.h文件的结尾处(在#endif 一行之前)添加了一行:
#define __restrict__
(4)把所有long long改成了__int64,如果是直接在vs2008下编译,则这个修改应该是不需要的(这步我没有遇到)
(5)
#ifdef __cplusplus
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "SDL/SDL.h"
//#include "windows.h"
extern "C"
{
#include "ffmpeg/avutil.h"
#include "ffmpeg/avcodec.h"
#include "ffmpeg/avformat.h"
}
#endif
#pragma comment(lib,"avutil.lib")
#pragma comment(lib,"avcodec.lib")
#pragma comment(lib,"avformat.lib")
(6)如果遇到error C3861: 'UINT64_C': identifier not found
在common.h里加入定义如下:
#ifndef INT64_C
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#endif
原文地址:http://blog.sina.com.cn/s/blog_6bcde18101011v2h.html
(1)像其他额外库一样,设置VC的Include路径为你c:\msys\local\include,设置VClib路径为次c:\msys\local\bin,增加操作系统的一个Path c:\msys\local\bin(这一步好像不是必须的)。
(2)将mingw安装目录下的include的inttypes.h,stdint.h,_mingw.h三个文件拷到你ffmpeg库的目录下的include
(3)在_mingw.h文件的结尾处(在#endif 一行之前)添加了一行:
#define __restrict__
(4)把所有long long改成了__int64,如果是直接在vs2008下编译,则这个修改应该是不需要的(这步我没有遇到)
(5)
#ifdef __cplusplus
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "SDL/SDL.h"
//#include "windows.h"
extern "C"
{
#include "ffmpeg/avutil.h"
#include "ffmpeg/avcodec.h"
#include "ffmpeg/avformat.h"
}
#endif
#pragma comment(lib,"avutil.lib")
#pragma comment(lib,"avcodec.lib")
#pragma comment(lib,"avformat.lib")
(6)如果遇到error C3861: 'UINT64_C': identifier not found
在common.h里加入定义如下:
#ifndef INT64_C
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#endif
原文地址:http://blog.sina.com.cn/s/blog_6bcde18101011v2h.html
0 0
- ffmpeg库移植到vc下需要的步奏
- FFMPEG 库移植到 VC 需要的步骤
- FFMPEG 库移植到 VC 需要的步骤
- FFMPEG 库移植到 VC 需要的步骤
- FFMPEG 库移植到 VC 需要的步骤
- ffmpeg.exe移植到vs2010编译步奏
- ffmpeg.exe移植到vs2010编译步奏
- ffmpeg.exe移植到vs2010编译步奏
- 移植ffmpeg到VC环境经验心得
- FFMPEG移植到Android(ubuntu环境下)
- FFMPEG移植到Android(ubuntu环境下)
- ubuntu下移植ffmpeg到android
- linux下裁剪ffmpeg移植到 Android
- Ubuntu 下将ffmpeg移植到Android
- 从windows移植到linux下需要注意的
- SGI STL到VC下的移植方法
- 移植ffmpeg库到Android后的简单使用
- ffmpeg转码器移植VC的工程:ffmpeg for MFC
- 使用libESMTP函数库实现电子邮件的发送
- table align="center"火狐中失效解决方法
- listview扩展功能
- iOS 项目架构以及注意事项规范
- InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
- ffmpeg库移植到vc下需要的步奏
- java RMI 基础教程
- light OJ 1027 A Dangerous Maze (期望)
- The incident LOST_EVENTS occured on the master. Message: error writing to the binary log, Error_code
- 持续集成1---初步
- iOS计算中英文混合字符串长度的方法
- Nagios监控mysql从库报错: libmysqlclient.so.18: cannot open shared object file: No such
- android之adb
- 面试题38:数字在排序数组中出现的次数