LIVE555再学习 -- Linux 下编译
生活随笔
收集整理的這篇文章主要介紹了
LIVE555再学习 -- Linux 下编译
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
現(xiàn)在我們來(lái)看一下 LIVE555 在Linux下的編譯
一、下載源碼
下載:Index of /liveMedia/public
參看:LIVE555 Streaming Media
選擇下載 live555-latest.tar.gz
二、文件介紹
我的開發(fā)環(huán)境為 Ubuntu 12.04 將上面下載的?live555-latest.tar.gz 解壓 tar -zxvf?live555-latest.tar.gz包括上述四個(gè)庫(kù)和mediaServer服務(wù)器程序,以及其他的測(cè)試代碼。 這幾個(gè)文件在官網(wǎng)是有介紹的: 參看:live555 Description
三、配置編譯
參看:How to configure and build the code on UnixThe source code package can be found (as a ".tar.gz" file)?here. Use "tar -x" and "gunzip" (or "tar -xz", if available) to extract the package; then cd to the "live" directory. Then run ./genMakefiles <os-platform> where?<os-platform>?is your target platform - e.g., "linux" or "solaris" - defined by a "config.<os-platform>" file. This will generate a Makefile in the "live" directory and each subdirectory. Then run "make".
- If the "make" fails, you may need to make small modifications to the appropriate "config.<os-platform>" file, and then re-run "genMakefiles?<os-platform>". (E.g., you may need to add another "-I<dir>" flag to the COMPILE_OPTS definition.)
- Some people (in particular, FreeBSD users) have reported that the?GNU version of "make"?- often called "gmake" - works better than their default, pre-installed version of "make". (In particular, you should try using "gmake" if you encounter linking problems with the "ar" command.)
- If you're using "gcc" version 3.0 or greater:?You may also wish to add the?-Wno-deprecated?flag to CPLUSPLUS_FLAGS.
- If no "config.<os-platform>" file exists for your target platform, then try using one of the existing files as a template.
翻譯一下: 解壓?live555-latest.tar.gz?tar -zxvf?live555-latest.tar.gz 進(jìn)入 live 目錄 cd live 然后執(zhí)行 ./genMakefiles <os-platform>
其中<os-platform>是您的目標(biāo)平臺(tái),例如由“config.<os-platform>”文件定義的“l(fā)inux”或“solaris”。 因此可知,應(yīng)執(zhí)行?./genMakefiles linux
這將在“l(fā)ive”目錄和每個(gè)子目錄中生成一個(gè)Makefile。 然后運(yùn)行“make”。
如果“make”失敗,您可能需要對(duì)相應(yīng)的“config.<os-platform>”文件進(jìn)行小修改,然后重新行“ genMakefiles <os-platform>”。 (例如,您可能需要在COMPILE_OPTS定義中添加另一個(gè)“-I <dir>”標(biāo)志。)
有些人(特別是FreeBSD用戶)已經(jīng)報(bào)告說(shuō),“make”的GNU版本(通常稱為“gmake”)比默認(rèn)的預(yù)裝版本“make”更好。 (特別是,如果遇到與“ar”命令的連接問(wèn)題,您應(yīng)該嘗試使用“gmake”。)
如果您使用的是“gcc”3.0或更高版本:您也可以將-Wno-deprecated標(biāo)志添加到CPLUSPLUS_FLAGS。
如果您的目標(biāo)平臺(tái)沒有“config.<os-platform>”文件,請(qǐng)嘗試使用其中一個(gè)現(xiàn)有文件作為模板。
如果您愿意,還可以通過(guò)運(yùn)行“make install”來(lái)安裝頭文件,庫(kù)和應(yīng)用程序。
然后可以看到 mediaServer 目錄下生成文件 live555MediaServer
四、測(cè)試
執(zhí)行?live555MediaServer然后找一個(gè)視頻文件,放在和?live555MediaServer同一目錄。注意視頻格式,要是上面所支持的。然后打開 VLC,媒體->打開網(wǎng)絡(luò)串流,輸入網(wǎng)絡(luò)URL。?rtsp://電腦IP地址/<filename>
五、源碼下載
下載:linux 下 LIVE555 項(xiàng)目工程總結(jié)
以上是生活随笔為你收集整理的LIVE555再学习 -- Linux 下编译的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: RPC和REST区别
- 下一篇: 阿里上线了一款新的电商app