MPEG Recorder编译过程

    技术2022-05-12  41

                  MPEG Recorder编译过程MPEG Recorder 是sourceforge上的一个开源项目,用于Windows 平台下的实时音视频信号的压缩与存储,用到 MFC, DirectX, FFMPEG and MPEG4IP等。最近项目要用到视频的转码与存储,于是下载下来学习学习,用VS2008编译中碰到一些问题,解决过程如下:1.在mpeg recorder solution下查看mpeg recorder工程的依赖库里面有strmbasd.lib,这当然需要安装directshow SDK并配置开发环境了,这些我都已经配置好了,此步就可以省略了。2:编译libmp4v2 工程到pSlash = strchr(pRtpMap, '/');处报错: error C2440: '=' : cannot convert from 'const char *' to 'char *'。将 char* pSlash; 改为const char* pSlash;3:编译rtp工程报错:fatal error C1083: Cannot open include file: 'winsock6.h': No such file or directory暂时解决方法:在configuration manager 中将rtp工程从Debug IPv6 Musica 调整为Debug,再次编译报错:error C2373: 'RegGetValueA' : redefinition; different type modifiers注释掉config_win32.h文件中的RegGetValue(HKEY *, char *, char*, char*, int)函数声明4:编译MPEGRecorder报错a:error C2664: 'localtime' : cannot convert parameter 1 from 'long *' to 'const time_t *'本人将出错代码:strftime(buffer, sizeof(buffer), "%T", localtime(&thistime.tv_sec));size = sprintf(str,"%s.ld-mp4live-7: ", buffer, thistime.tv_usec / 1000);修改为:time_t rawtime;struct tm * timeinfo;time( &rawtime );timeinfo = localtime ( &rawtime );strftime(buffer, sizeof(buffer), "%T", timeinfo);size = sprintf(str,"%s.

    转载请注明原文地址: https://ibbs.8miu.com/read-1649983.html

    最新回复(0)