Created
August 8, 2019 08:23
-
-
Save yzf/82f073816dbdd6174e190b0f79de79b7 to your computer and use it in GitHub Desktop.
自编译webrtc-native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to build webrtc-native | |
1. gettting code | |
```bash | |
fetch --nohooks webrtc_android | |
gclient sync | |
``` | |
PS: more details refer to https://webrtc.org/native-code/android/ | |
2. modify webrtc origin code | |
```bash | |
cd webrtc_android/src | |
git checkout m75 | |
git reset --hard fdcb6ee481 | |
# git remote -v | |
git remote set-url origin [email protected]:wuyisheng/webrtc-native.git | |
git fetch && git rebase origin m75 | |
``` | |
3. config and build | |
```bash | |
cd webrtc_android/src | |
# config for arm | |
gn gen out/Release --args='target_os="android" target_cpu="arm" rtc_use_h264=true rtc_use_h265=true ffmpeg_branding="Chrome" proprietary_codecs=true' | |
# config for x86 | |
gn gen out/Releasex86 --args='target_os="android" target_cpu="x86" rtc_use_h264=true rtc_use_h265=true ffmpeg_branding="Chrome" proprietary_codecs=true' | |
# more config? | |
# Refer to webrtc's docs and review thoes code that I have modified. | |
``` | |
```bash | |
ninja -C out/Release | |
ninja -C out/Releasex86 | |
``` | |
PS: It take's about three hour to sync code and build. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment