构建webRTC-Linux版

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源码

用于查看webRTC源码的chromium扩展

参考文档

  1. WebRTC samples
  2. wertc.org
  3. sipjs
  4. webrtc可用性检测
  5. WEBRTC三种类型(Mesh、MCU 和 SFU)的多方通信架构
  6. webrtc 在voip freeswitch中的应用
posted @   jingjingxyk  阅读(590)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示