先配置好depot_tools
下载源码
1
2
fetch --no-history --nohooks webrtc
gclient sync
进入src目录配置
1
2
gn gen out/Default
Done. Made 1764 targets from 295 files in 5178ms
编译
1
2
3
autoninja -C out/Default
ninja: Entering directory `out/Default'
[6307/6307] STAMP obj/default.stamp
编译出了peerconnection_server.exe和peerconnection_client.exe,stunserver.exe,turnserver.exe等程序
参考
https://webrtc.googlesource.com/src/+/main/docs/native-code/development/