linux 下构建webRTC
#!/bin/bash
set -exu
__CURRENT__=`pwd`
__DIR__=$(cd "$(dirname "$0")";pwd)
cd ${__DIR__}
start_time=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
start_time_unix_timestamp=$(date +"%s")
bash webrtc/src/build/install-build-deps.sh --no-chromeos-fonts --no-arm
export PATH=${__DIR__}/depot_tools:$PATH
webrtc_build_dir=${__DIR__}/webrtc_build_dir
test -d ${__DIR__}/webrtc_build_dir && rm -rf ${__DIR__}/webrtc_build_dir
mkdir -p ${__DIR__}/webrtc_build_dir
test -d ${__DIR__}/blank/ && rm -rf ${__DIR__}/blank/
mkdir -p ${__DIR__}/blank/
rsync --delete-before --progress --stats -d $webrtc_build_dir
cd /webrtc/src/
git branch
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/share/pkgconfig:/usr/local/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig/
find /usr/lib* -name gmodule-2.0.pc
find /usr/lib* -name gthread-2.0.pc
find /usr/lib* -name gtk+-3.0.pc
find /usr/lib* -name xproto.pc
gn gen $webrtc_build_dir --args='is_debug=false symbol_level=0 target_cpu="x64" target_os="linux" dcheck_always_on=false is_official_build=true is_component_build=false chrome_pgo_phase=false'
gn args $webrtc_build_dir --list
ninja -C $webrtc_build_dir
end_time=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
end_time_unix_timestamp=$(date +"%s")
echo $end_time
echo "花费:"$(( ($end_time_unix_timestamp - $start_time_unix_timestamp)/60 ))"分钟"
参考文档
- WebRTC samples
- wertc.org
- sipjs
- webrtc可用性检测
- WEBRTC三种类型(Mesh、MCU 和 SFU)的多方通信架构
- webrtc 在voip freeswitch中的应用