Setting Environment

Install following packages

 sudo apt install gcc g++

Clone WebRTC repo

 mkdir webrtc
 cd webrtc

 git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git

 export PATH=$PATH:$(pwd)/depot_tools
 GYP_DEFINES="target_arch=arm" fetch --no-history webrtc

It will take a little more time to fetch WebRTC code.

NOTE : if failed then restart last step again and follow the instruction if it will not restart.

After success you will see 2 directory depot_tools/ and src/.

Compilation (for x86)

Make sure PATH contains depot_tools location Go inside src directory

 cd src

 # generate ninja files
 gn gen out/Default --args='is_debug=false'

 # to build
 ninja -C out/Default

After successfull compilation, peerconnection_client binary will be created inside out/Default

For mor info, visit WebRTC-Development


©2023-2024 rculock.com