Linux下live555的編譯

2021-08-10 11:32:09 字數 1882 閱讀 4470

使用海思arm-hisiv100nptl-linux交叉編譯

專案位址

[plain]

view plain

copy

tar -zxvf live555-latest.tar  

cd live  

通過改寫"config.armlinux"檔案儲存為我們的makefile配置檔案"config.hi3531"再進行編譯  

最新版本的live555庫已經更正了以前的一些錯誤,請詳細比對

[cpp]

view plain

copy

cross_compile?=arm-hisiv100nptl-linux-  

compile_opts =$(includes) -i. -o2 -dsocklen_t=socklen_t -dno_sstream=1 -d_largefile_source=1 -d_file_offset_bits=64 -dlocale_not_used  

c =c  

c_compiler =$(cross_compile)gcc  

c_flags =$(compile_opts)  

cpp =cpp  

cplusplus_compiler =$(cross_compile)g++  

cplusplus_flags =$(compile_opts) -wall -dbsd=1  

obj =o  

link =$(cross_compile)g++ -o  

link_opts =  

console_link_opts =$(link_opts)  

library_link =$(cross_compile)ar cr   

library_link_opts =$(link_opts)  

lib_suffix =a  

exe =  

儲存我們的config.3531,字尾即為我們生成makefile的引數

[plain]

view plain

copy

./genmakefile 3531  

make  

make install  

進入live/testprogs資料夾,可以看到已經生成的各種示例程式。使用服務端live555mediaserver和客戶端testrtspclient進行測試。

[plain]

view plain

copy

./live555mediaserver  

[plain]

view plain

copy

./testrtspclient rtsp:  

執行後,假設192.168.1.1是乙個流**伺服器,請求成功後會出現接收資料的列印資訊。

注意:如果伺服器需要使用者認證資訊,直接請求會返回401失敗資訊,修改testrtspclient.cpp加入認證就可以成功請求。

另乙個示例openrtsp增添了很多配置資訊,具體可以參考live555的手冊,新增認證的方法如下:

[plain]

view plain

copy

./openrtsp -u admin admin rtsp:  

完成上述工作後live555就已經成功部署到linux中了。

最重要的一點:在編譯自己的live555程式時,在呼叫靜態庫的時候務必遵守以下呼叫順序,否則會出現鏈結庫不成功的情況。

[plain]

view plain

copy

liblivemedia.a  

libgroupsock.a   

libbasicusageenvironment.a  

libusageenvironment.a  

Linux下live555的編譯

使用海思arm hisiv100nptl linux交叉編譯 專案位址 plain view plain copy tar zxvf live555 latest.tar cd live 通過改寫 config.armlinux 檔案儲存為我們的makefile配置檔案 config.hi3531 ...

live555原始碼分析 live555大致流程

今天大致分析了下live555的流程,以h264為例子進行的分析.從連線到傳送rtp rtcp資料報。首先分析呢,不能太關注細節,先整體再區域性。在分析的過程中,設計到live555自己封裝的乙個高階類 比如迭代器,雜湊表,而且這2個類在live555中運用的範圍還非常的廣,但是無不例外都是用鍊錶進...

Live555學習筆記

live555原始碼 官網 關於live555編譯 linux編譯 1.進入live555目錄 cd live 2.執行genmakefiles檔案 genmakefiles linux 3.makefile windows編譯 無關於入口函式 標頭檔案位置 無 原始檔位置 mediaserver ...