ffmpeg 預設是用C檔案來編譯的,如果某個CPP檔案想引用ffmpeg中的某些函數或者頭檔案,有可能出現
‘UINT64_C’ was not declared in this scope的錯誤
情形大概如下
The same issue i'm getting here when compiling chromium with ffmpeg from svn:
In file included from /usr/include/libavutil/avutil.h:81:0,
from /usr/include/libavcodec/avcodec.h:30,
from out/Release/obj.target/geni/ffmpeg_stubs.cc:16:
/usr/include/libavutil/common.h: In function 'int32_t av_clipl_int32(int64_t)':
/usr/include/libavutil/common.h:154:47: error: 'UINT64_C' was not declared in this scope
make: *** [out/Release/obj.target/geni/ffmpeg_stubs.o] Error 1
可以 在cpp檔案中加入
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
來解決
如果在android下用編譯。在Android.mk加入
LOCAL_CFLAGS := -D__STDC_CONSTANT_MACROS即可
編譯為動态庫時的問題:
修改方法:
./configure --enable-pic && make
如果使用的是虛拟機進行開發live555.需要加入路由表:
route add default gw xxx.xxx.xxx.xxx eth0
編譯ffmpeg後,直接編譯示例不能通過顯示庫不能找到問題解決。
原來,為了讓pkg-config可以得到這些資訊,要求庫的提供者,提供一個.pc檔案,.pc檔案裡面存放的是一些頭檔案及庫的位址。這些.pc檔案預設放在/usr/share/pkgconfig裡面,如果你改變了.pc的存放路徑,必須要讓計算機知道,是以需要修改 PKG_CONFIG_PATH 。
假設我的.pc檔案放到了/usr/local/lib/pkgconfig下,我需要做如下修改:
live555在windows環境編譯vs2010:
0 綜述:利用genWindowsMakefiles.cmd生成VS可用的makefile
1 修改win32config。打開live\win32config檔案,修改如下
TOOLS32 = c:\Program Files\DevStudio\Vc
TOOLS32 = E:\Program Files\Microsoft Visual Studio 10.0\VC
将TOOLS32修改為你的VS2010路徑
LINK_OPTS_0 = $(linkdebug) msvcirt.lib
LINK_OPTS_0 = $(linkdebug) msvcrt.lib
編譯器索要的LINK運作庫不同,原本以為可以改為msvcrt100.lib,但沒找着
2 新增Makefile設定。打開live\groupsock\Makefile.head,修改如下
INCLUDES = -Iinclude -I../UsageEnvironment/include
INCLUDES = -Iinclude -I../UsageEnvironment/include -DNO_STRSTREAM
3 建立makefile
方法:運作live\genWindowsMakefiles.cmd,生成VS能夠編譯的*.mak檔案
4 建立build.bat指令
建立live\complie.bat,并添加内容如下:
5 開始編譯:(指令行下)執行complie.bat
參考文章:
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">linux擷取本機IP位址問題(live555)</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/onelight1997/article/details/7528935</a>
live555虛拟機下不能擷取資料問題:
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/wesleyluo/article/details/6204635</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/liushu1231/article/details/9203239</a>
識别I幀P幀B幀。
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/linzhiji/article/details/5393647</a>
解碼流程經典教程:
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://www.360doc.com/content/11/1117/09/8050095_165108638.shtml</a>
ffmpeg時間戳問題彙總
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://www.cnblogs.com/loveclover/archive/2011/03/23/1993065.html</a>
ffmpeg開發SDK介紹
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.sina.com.cn/s/blog_62a8419a01016exv.html</a>
含有B幀時的疑惑
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://bbs.csdn.net/topics/390692774</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">100行代碼實作最簡單的基于FFMPEG+SDL的視訊播放器</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/leixiaohua1020/article/details/8652605</a>
ffmpeg解碼花屏,碼流丢失問題
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://bbs.rosoo.net/thread-14856-1-1.html</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">FFMpeg中的函數</a>
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://blog.csdn.net/howema/article/details/6065441</a>
FFMPEG重要學習官方資料:
<a href="http://demo.netfoucs.com/gubenpeiyuan/article/details/19826999">http://ffmpeg.org/faq.html</a>