Vs2008编译mpeg4ip

Vs2008编译mpeg4ip

 

       最近项目中要添加一个MP4文件录制功能,准备用mpeg4ip实现这个功能。下面是mpeg4ipvs2008下编译的过程,遇到的一些问题,解决办法,及一些未解决的问题。

 

       Mpeg4ip分为两大模块:encoding60.dsw(文件的根目录下),player60.dsw(根目录\player\src)。这次编译的是1.5.0.1版本。

 

       问题:vs2008打开encoding60.dsw(VC开发环境生成的项目文件,用来把多个工程组织到一个项目中,文本格式)文件时,说是一些工程文件(.dspVC开发环境生成的工程文件,文本格式)格式不对让转换格式,但是转换后却无法加载部分工程。

       解决:用UltraEdit或其它的文本工具,打开dsp文件把它转换成DOS格式,然后另存为,覆盖原文件。

 

       问题:Cannot open include file: 'winsock6.h': No such file or directory

       临时解决:将工程从Debug IPv6 Musica 调整为Debug,注释掉

int inet_pton(int af, const char *src, void *dst);

const char *inet_ntop(int af, const void *src, char *dst, size_t size);

两个函数。

 

       问题:编译libmp4v2 工程时报:cannot convert from 'const char *' to 'char *'的错误。

       解决:将 char* pSlash; 改为const char* pSlash

 

       问题:找不到SDL.h头文件。

       解决:把编译好的SDL整个项目文件夹导入mpeg4ip的根目录下,把文件名改为SDL,在SDL文件夹了见一个lib文件夹,把编译好的SDL.libSDL.dllDSLmain.lib导入lib文件夹中。

       问题:'int8_t' : redefinition; different basic types  SDLmpeg4ip 定义int8_t的头文件重复定义了。

       解决:在SDLsdl_config_win32.h 定义的

typedef signed __int8                  int8_t;

typedef unsigned __int8                uint8_t;

typedef signed __int16                 int16_t;

typedef unsigned __int16               uint16_t;

typedef signed __int32                 int32_t;

typedef unsigned __int32               uint32_t;

改为

typedef signed __int8             int8_tt;

typedef unsigned __int8         uint8_tt;

typedef signed __int16           int16_tt;

typedef unsigned __int16       uint16_tt;

typedef signed __int32           int32_tt;

typedef unsigned __int32       uint32_tt;

typedef signed __int64           int64_tt;

typedef unsigned __int64       uint64_tt;

也就是重新更换一下变量名,把SDL用到的那写变量名int8_uint8_t等全都改过来,改为如int8_ttuint8_tt等。

 

       经过上面的处理过后,大部分工程都可以编译过去了,不过还有几个没有编译过去。

       在encoding60项目中的isoencoder工程没有编译过去,报'iostream.h': No such file or directory'fostream.h': No such file or directory错,把头文件改为#include <iostream>时,又报一些syntax error : identifier 'istream'syntax error : identifier 'ostream'错误。

 

       在player60项目中,libmpplayerlibobj mp4playermpeg4_iso_pluginwmp4client60wmp4player60工程没有编译过去,主要报如下错误:

1,跟编译isoencoder工程一样的错误。

2,non-aggregates cannot be initialized with initializer list错误。

     由于MP4文件录制只有用到libmp4v2这个工程中的libmp4v260.lib这个静态库,所以其它一些未编译过的工程没有再去做研究。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值