build webrtc for android

git hub 的网址:https://github.com/lukeweber/webrtc-jingle-client


About

  • Working example android and ios apps of libjingle and webrtc voice backend.
  • Based on libjingle trunk and webrtc trunk updated on regular intervals.
  • Added improvements for stability and missing pieces for mobile implementation.
  • Can make calls between two phones, or between gmail and a phone.
  • Happy for any help, please see tickets, and send a pull request.

Getting the code

# IMPORTANT:- gclient command from [depot_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools) 
# has to be used to checkout the project else the third_party dependencies don't get pulled 
# 

# mkdir webrtcjingleproject
# cd webrtcjingleproject
# gclient config https://github.com/lukeweber/webrtc-jingle-client.git --name trunk
# gclient sync

or for an older stable build, take the head of the stable branch revision.
# gclient sync --revision PUT_STABLE_HEAD_REV_HERE

Android

Prereqs

#Android
export ANDROID_SDK_ROOT=/path/to/sdk/
export ANDROID_NDK_ROOT=/path/to/ndk/
export PATH=$PATH:$ANDROID_NDK_ROOT:$ANDROID_SDK_ROOT:$ANDROID_SDK_ROOT/platform-tools

#mvn variables
export ANDROID_HOME=$ANDROID_SDK_ROOT
export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT

Running the project

  • Build, deploy to phone, and start debugger in one script: tools/badit_android.py
  • Build the apks: cd trunk/android && mvn install
  • To run a debugger: build/android/gdb_apk -p com.tuenti.voice.example -s VoiceClientService -l android/voice-client-native/obj/${build_profile}/local/${app_abi}
  • For debugging the ndk compile outside of maven, I sometimes prefer and use a light shell wrapper instead of maven for building only the c++ project. trunk/android/voice-client-native && ./build.sh

Run unittests

  • Build debug code jni in debug mode: cd trunk/android/voice-client-core && ./build.sh
  • Generate unittest apk: tools/gen_tests_apk.sh
  • Install unittest : adb install -r adb install -r voice_testing/${app_abi}/${lib}/${lib}-debug.apk
  • Prepare
  • Run unittest:
# adb shell mkdir /sdcard/talk
# adb shell am start -n org.chromium.native_test/org.chromium.native_test.ChromeNativeTestActivity
# See adb logcat adb | grep libjingle
  • Fetch unittest logs: adb pull /sdcard/talk talk-logs

Build for Video(Experimental)

  • NO UI YET, need more changes in libjingle core to make this work.
  • DEPS build on linux and mac.
  • Need to wire the java code in example app, using third_party/webrtc/video_engine/test/android/src/org/webrtc/videoengineapp/WebRTCDemo.java as a template.
  • webrtcvideoengine.cc will certainly need changes, as will VideoRenderer to enable passing a java ref down to webrtc, contact me if you want to give this a shot.
# cd android/voice-client-core/
# ln -s [insert_full_path_here]/trunk/third_party/libvpx/source/libvpx jni/libvpx
# cd third_party/libvpx/source 
# git pull https://gerrit.chromium.org/gerrit/webm/libvpx refs/changes/99/41299/1
# libvpx/configure --target=armv7-android-gcc --disable-examples --sdk-path=$ANDROID_NDK_ROOT --enable-error-concealment --enable-realtime-only --disable-vp9 --enable-pic
# Open jni/libvpx/build/make/Android.mk => change BUILD_SHARED_LIBRARY to BUILD_STATIC_LIBRARY
# 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值