ubuntu 编译linux webrtc库
安装依赖
sudo apt-get update
sudo apt-get install build-essential libssl-dev libasound2-dev libpulse-dev libjpeg-dev libxv-dev libgtk-3-dev libxtst-dev libwebp-dev
sudo apt-get install libglib2.0-dev
sudo apt-get update 报错时出现同样问题参考:
https://blog.csdn.net/qq_15204179/article/details/134612954?spm=1001.2014.3001.5501
mkdir /webrtc
cd webrtc
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/home/sukai/3rdparty/webrtc/depot_tools
git clone https://github.com/crow-misia/libwebrtc-bin
cd libwebrtc-bin/build
make USE_H264=1 linux-x64
编译时间比较长:
出现这个要耐心等等,不要以为程序进入了死循环,过一段时间会显示进度的.
[0:07:48] Still working on:
[0:07:48] src/third_party
[0:07:48] src/tools
静待编译完成, 最后在libwebrtc-bin目录中有各package目录,其中包含了include lib libwebrtc-linux-x64-h264.tar.xz NOTICE VERSION等几个目录,lib目录中为编译后的 .a库,相关的头文件在include目录中。