Skip to content

mutexstream/webrtc-native-build

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webrtc-native-build

Native build of Google's webrtc library. The library is also packaged with BoringSSL and libyuv.

  • WebRTC is a standard for real-time audio/video/data communication and is mostly used in web browsers.
  • BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
  • libyuv is an open source project that includes YUV scaling and conversion functionalities.

License

By default, libwebrtc is built with non-free codecs. To build without them, change the following flags in generate_ninja_files.bash and generate_ninja_files.bat.

rtc_use_h264=false
proprietary_codecs=false
ffmpeg_branding="Chromium"

Dependencies (Linux)

sudo apt-get install ninja-build cmake build-essential libssl-dev libboost-all-dev
sudo apt-get install libglib2.0-dev libgtk-3-dev libpulse-dev libasound2-dev
sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

Dependencies (Mac)

# XCode and homebrew must be installed first.
brew install ninja

Building

# Create build directory
mkdir build
# Go to build directory
cd build
# Run CMake with arguments
cmake ../ [-DCMAKE_BUILD_TYPE=Release|Debug] [-DCMAKE_BUILD_ARCHITECTURE=arm32|arm64|amd64|win64|osx64]
# Parallel build
make -j
# will copy to dist directory
make install

Building on Windows

Dependencies

  • Ninja
    • Copy ninja.exe in 3rdParty/webrtc_native/
  • CMake
  • Git
  • Python
  • MSVC 2019 Build Tools
  • Windows SDK 10.1.19041 (make sure that it is checked while installing MSVC)
  • Windows SDK Debugging Tools
    1. Navigate to Control Panel -> Programs -> Programs and Features
    2. Right-click on Windows Software Development Kit, and choose Change
    3. Select Change and click Next
    4. Check the box for Debugging Tools for Windows and click Change Make sure to check Add to PATH for everything you install

Setup

  • Create a copy of your <python_dir>/python.exe executable as <python_dir>/python3.exe.
  • Make sure that python, python3, cmake and git are in your path.
  • Make sure the registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem::LongPathsEnabled is set to 0x1
  • Launch a CMD prompt as Administrator, and execute git config --system core.longpaths true

Building

Using a CMD prompt (not tested with powershell or git-bash or any other shell)

# Create build directory
mkdir build
# Go to build directory
cd build
# Run CMake with arguments
cmake .. -G "Ninja" [-DCMAKE_BUILD_TYPE=Release|Debug]
# Parallel build
ninja
# Copy to dist directory
ninja install
# Generate a zip archive in build/
ninja package

Important notes

  • You might have trouble building if your system is not in English
  • You might have trouble building if the full path to python.exe has at least one space in it

Consuming the library

On Windows, you will have to link any target that consumes this library to these additional Windows libraries:

  • secur32
  • winmm
  • dmoguids
  • wmcodecdspuuid
  • msdmo
  • strmiids

If you don't link against these libraries, your linker might see missing symbols like these ones:

  • __imp_timeGetTime
  • __imp_timeKillEvent
  • __imp_timeSetEvent
  • __imp_timeBeginPeriod
  • __imp_timeEndPeriod
  • CLSID_CWMAudioAEC
  • IID_IMediaObject
  • IID_IMediaBuffer
  • MoInitMediaType
  • MoFreeMediaType
  • InitializeSecurityContextA
  • AcquireCredentialsHandleA
  • __imp_FreeCredentialsHandle
  • CompleteAuthToken
  • __imp_DeleteSecurityContext

Versioning Scheme

branch-head-number.commit-hash.patch-number

Authors

  • Marc-Antoine Maheux (@mamaheux)
  • Dominic Létourneau (@doumdi)
  • Philippe Warren (@philippewarren)

License

Sponsor

IntRoLab

IntRoLab - Intelligent / Interactive / Integrated / Interdisciplinary Robot Lab

About

Native build of Google's webrtc library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CMake 100.0%