Building WebRTC for Android

10,815 views
Skip to first unread message

Manjesh (GoCast)

unread,
Dec 29, 2011, 1:43:27 PM12/29/11
to discuss...@googlegroups.com
Hi everyone,

I am working on a project that involves building WebRTC for Android. While going through the posts on this group, I've come across some members who have been able to build WebRTC for Android successfully. Since I didn't find any descriptive post as to how to build for Android, I have started this thread in the hopes of making it a one stop information shop for people interested in building WebRTC for Android. Let me start of the discussion by putting up the following questions to members who have successfully built WebRTC for Android:

1. What revision of the WebRTC source did you use?
2. What version of Android source/ndk did you use?
3. Is the ndk alone sufficient to build WebRTC or do you need the complete Android source code?

It would also be of great help if you could describe the steps you took to get WebRTC to build on Android.

Thanks,

Manjesh

David Menga

unread,
Dec 29, 2011, 1:51:51 PM12/29/11
to discuss...@googlegroups.com


2011/12/29 Manjesh (GoCast) <man...@gocast.it>

TwinLife Dev Team

unread,
Dec 29, 2011, 4:30:37 PM12/29/11
to discuss...@googlegroups.com
Hello Manjesh,

> Hi everyone,
>
> I am working on a project that involves building WebRTC for Android.
> While going through the posts on this group, I've come across some
> members who have been able to build WebRTC for Android successfully.
> Since I didn't find any descriptive post as to how to build for
> Android, I have started this thread in the hopes of making it a one
> stop information shop for people interested in building WebRTC for
> Android. Let me start of the discussion by putting up the following
> questions to members who have successfully built WebRTC for Android:
>
> 1. What revision of the WebRTC source did you use?

The port has been started with the version of the 18th of November. Then
evolution of the source code has been tracked.

> 2. What version of Android source/ndk did you use?

Android ndk r7 on an Ubuntu machine.

> 3. Is the ndk alone sufficient to build WebRTC or do you need the
> complete Android source code?

Android ndk is sufficient.

>
> It would also be of great help if you could describe the steps you
> took to get WebRTC to build on Android.
>

Nearly all the work has been done by the Google team, Android.mk are
present in the src tree, only few are missing in the third_party three
but they are easy to add, adaptation to Android is present when needed.

It has only been necessary to develop a minimal Java/C++ application
based on the peerconnection sample and to fix minor compilation issues.

Still in debug phase... with a Nexus One and a Linux box.
The Nexus One - even with Neon support - does not seem to have enough
horse power to decode VP8 frames. VP8 encoding is better.
Debug is going to be continued with a tablet based on Tegra 2.

Best regards,
Christian

Manjesh (GoCast)

unread,
Dec 29, 2011, 5:53:08 PM12/29/11
to discuss...@googlegroups.com
Dear Christian,

Thanks for the reply. I will follow your suggesstions and get back to you.

- Manjesh
--
Manjesh Malavalli

David Menga

unread,
Dec 29, 2011, 6:28:37 PM12/29/11
to discuss...@googlegroups.com, Jehan Monnier
Hello Manjesh , 

To help, you should consider using the Linphone open source SIP software , which runs on different platforms :
  • Linux/x86 and Linux/x86-64
  • Windows XP and Vista
  • Linux/ARM: without graphical interface. Linphonec or liblinphone are good candidates to provide the software stack of an hardware phone or hardware communication system.
  • Linux/Blackfin: The uclinux.org project maintains a port of linphone for blackfin processors, without gui. Performance are impressive. See here for details.
  • MacOS X x86 : audio and video. You can download a standalone bundle from this website or, use macports.
  • Google Androidaudio and video, download with the Android Market from your phone.
  • Iphone OS: audio and video, download from the AppStore on your iphone/ipad or ipod touch.
  • Blackberry OS: Audio only, pure j2me version of Linphone. 
  • WebOS : unofficial port, see information here: http://www.webos-internals.org/wiki/Application:Linphone
and last , but not least , Ipad 2 .  


Linphone uses open source and royalty free codecs such as VP8 and iLBC , speex-HD. 

David Menga


2011/12/29 David Menga <david...@gmail.com>

Manjesh (GoCast)

unread,
Dec 29, 2011, 7:11:17 PM12/29/11
to discuss...@googlegroups.com
Hey Christian,

As you had specified, I downloaded Android NDK r7 on Ubuntu 11.04, and checked out WebRTC r1095. Then I tried to build 'trunk/src/voice_engine/main/test/android/android_test' voice engine test app by executing:

ndk-build -e

Everything is going along fine, but then I receive this error:
                      -----------------------------
SharedLibrary  : libwebrtc_audio_preprocessing.so
./obj/local/armeabi/libwebrtc_apm.a(audio_buffer.o):(.data.rel.ro+0x10): undefined reference to `vtable for __cxxabiv1::__class_type_info'
                      -----------------------------

Did you ever come across this error? Please let me know?

Paul D.

unread,
Jan 13, 2012, 3:10:05 AM1/13/12
to discuss-webrtc
After trudging my way through a few errors, I have also run into this
one.
Please advise.

Manjesh (GoCast)

unread,
Jan 13, 2012, 2:41:18 PM1/13/12
to discuss...@googlegroups.com
Hi Paul,

I think that error occurs when you try to run the test app on the simulator. I ran the app on my nexus and it worked.
So try running the app on the device.

- Manjesh
--
Manjesh Malavalli

Artem

unread,
Jan 24, 2012, 8:27:46 AM1/24/12
to discuss...@googlegroups.com
Hi Manjesh,
Wondering how you was able to build it...

Could any someone please help me to build it for Android?

I have Ubuntu 11.10 32bit. Downloaded latest version of WebRTC (r1525), installed latest ndk (r7) but was not able to compile it for Android.
I successfully did it for ubuntu, but not for Android.

The first problem that I faced with was this:
include $(LOCAL_PATH)/../../external/webrtc/android-webrtc.mk

First of all for some reason LOCAL_PATH points to NDK folder, not to project one (jni/Android.mk:57: /home/artem/Development/android-sdks/android-ndk-r7/build/core/../../external/webrtc/android-webrtc.mk: No such file or directory)

The second problem is that there is no "external" folder in NDK and I replaced it with path to my project's folder

And after that I got a lot of compilation errors:
artem@artem-nb:~/Development/eclipse_workspaces/webrtc/webrtctest$ ndk-build
Compile++ thumb  : webrtc_apm_process_test <= process_test.cc
jni/src/modules/audio_processing/test/process_test.cc:17:25: error: gtest/gtest.h: No such file or directory
jni/src/modules/audio_processing/test/process_test.cc:25:67: error: external/webrtc/src/modules/audio_processing/debug.pb.h: No such file or directory
jni/src/modules/audio_processing/test/process_test.cc:39: error: 'webrtc::audioproc' has not been declared
jni/src/modules/audio_processing/test/process_test.cc:40: error: 'webrtc::audioproc' has not been declared

.......





Also I tried to build "trunk/src/voice_engine/main/test/android/android_test" but without success either - NDK was not able to include other Android.mk files because LOCAL_PATH was initialized as "jni".

Could someone please help me to sort out these issues

Thanks
Artem

Gustavo

unread,
Jan 24, 2012, 8:42:36 AM1/24/12
to discuss-webrtc
I've also built it recently, I'll try to post all the details latter,
but asking to your concrete questions:

Regarding the first problem, change it to:
"include $(MY_WEBRTC_ROOT_PATH)/android-webrtc.mk"

Regarding the second problem:
Simplest solution is to avoid compiling webrtc_apm_process_test.
Modify /src/modules/audio_processing/Android.mk to comment the lines
related to that component.

Artem

unread,
Jan 24, 2012, 9:08:29 AM1/24/12
to discuss...@googlegroups.com
Thanks Gustavo,
Will be wait your post. Meanwhile I've tried to modify /src/modules/audio_processing/
Android.mk and build process has been started, but then new errors occurred:

artem@artem-nb:~/Development/eclipse_workspaces/webrtc/webrtctest$ ndk-build
Compile arm    : webrtc_spl <= auto_corr_to_refl_coef.c
Compile arm    : webrtc_spl <= auto_correlation.c
Compile arm    : webrtc_spl <= complex_fft.c
Compile arm    : webrtc_spl <= complex_bit_reverse.c
Compile arm    : webrtc_spl <= copy_set_operations.c
Compile arm    : webrtc_spl <= division_operations.c
Compile arm    : webrtc_spl <= dot_product_with_scale.c
Compile arm    : webrtc_spl <= downsample_fast.c
Compile arm    : webrtc_spl <= energy.c
Compile arm    : webrtc_spl <= filter_ar.c
Compile arm    : webrtc_spl <= filter_ar_fast_q12.c
Compile arm    : webrtc_spl <= filter_ma_fast_q12.c
Compile arm    : webrtc_spl <= get_hanning_window.c
Compile arm    : webrtc_spl <= get_scaling_square.c
Compile arm    : webrtc_spl <= ilbc_specific_functions.c
Compile arm    : webrtc_spl <= levinson_durbin.c
Compile arm    : webrtc_spl <= lpc_to_refl_coef.c
Compile arm    : webrtc_spl <= min_max_operations.c
Compile arm    : webrtc_spl <= randomization_functions.c
Compile arm    : webrtc_spl <= refl_coef_to_lpc.c
Compile arm    : webrtc_spl <= resample.c
Compile arm    : webrtc_spl <= resample_48khz.c
Compile arm    : webrtc_spl <= resample_by_2.c
Compile arm    : webrtc_spl <= resample_by_2_internal.c
Compile arm    : webrtc_spl <= resample_fractional.c
Compile arm    : webrtc_spl <= spl_sqrt.c
Compile arm    : webrtc_spl <= spl_sqrt_floor.c
Compile arm    : webrtc_spl <= spl_version.c
Compile arm    : webrtc_spl <= splitting_filter.c
Compile arm    : webrtc_spl <= sqrt_of_one_minus_x_squared.c
Compile arm    : webrtc_spl <= vector_scaling_operations.c
Compile arm    : webrtc_spl <= cross_correlation.c
StaticLibrary  : libwebrtc_spl.a
Compile++ arm    : webrtc_resampler <= resampler.cc
StaticLibrary  : libstdc++.a
StaticLibrary  : libwebrtc_resampler.a
Compile++ arm    : webrtc_apm <= audio_buffer.cc
Compile++ arm    : webrtc_apm <= audio_processing_impl.cc
In file included from jni/src/modules/audio_processing/audio_processing_impl.cc:11:
jni/src/modules/audio_processing/audio_processing_impl.h:16:16: error: list: No such file or directory
jni/src/modules/audio_processing/audio_processing_impl.h:17:18: error: string: No such file or directory
In file included from jni/src/modules/audio_processing/echo_cancellation_impl.h:15,
                 from jni/src/modules/audio_processing/audio_processing_impl.cc:17:
jni/src/modules/audio_processing/processing_component.h:14:18: error: vector: No such file or directory
In file included from jni/src/modules/audio_processing/audio_processing_impl.cc:11:
jni/src/modules/audio_processing/audio_processing_impl.h:100: error: ISO C++ forbids declaration of 'list' with no type
jni/src/modules/audio_processing/audio_processing_impl.h:100: error: invalid use of '::'
jni/src/modules/audio_processing/audio_processing_impl.h:100: error: expected ';' before '<' token
In file included from jni/src/modules/audio_processing/echo_cancellation_impl.h:15,
                 from jni/src/modules/audio_processing/audio_processing_impl.cc:17:
jni/src/modules/audio_processing/processing_component.h:47: error: ISO C++ forbids declaration of 'vector' with no type
jni/src/modules/audio_processing/processing_component.h:47: error: invalid use of '::'
jni/src/modules/audio_processing/processing_component.h:47: error: expected ';' before '<' token
In file included from jni/src/modules/audio_processing/audio_processing_impl.cc:21:


Artem

unread,
Jan 24, 2012, 9:11:55 AM1/24/12
to discuss...@googlegroups.com
Seems to me now I have problems with stl library - maybe I should set some variable to compile without stl? Because in system_wrappers I see some files like these: list_stl and list_no_stl

Artem

unread,
Jan 24, 2012, 2:50:16 PM1/24/12
to discuss-webrtc
Faced with the same issue as described above:

SharedLibrary : libwebrtc_audio_preprocessing.so
./obj/local/armeabi/libwebrtc_apm.a(audio_buffer.o):(.data.rel.ro
+0x10): undefined reference to `vtable for
__cxxabiv1::__class_type_info'
./obj/local/armeabi/libwebrtc_apm.a(audio_processing_impl.o): In
function `std::__node_alloc::deallocate(void*, unsigned int)':
/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/
stlport/stlport/stl/_alloc.h:161: undefined reference to
`std::__node_alloc::_M_deallocate(void*, unsigned int)'
/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/
stlport/stlport/stl/_alloc.h:161: undefined reference to
`std::__node_alloc::_M_deallocate(void*, unsigned int)'

and so on ...

Artem

Gustavo

unread,
Jan 24, 2012, 3:29:41 PM1/24/12
to discuss-webrtc
You have to disable rtti to get rid of that error.

I've built webrtc for android recently (although I'm just interested
in the voice part and disabled most of the video components). Find
below the most important files I added or modified:

Android.mk https://gist.github.com/1672311
Application.mk https://gist.github.com/1672321

I'm using ndk-r7 and launching the build with this command:
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=Application.mk

In addition I had to:
- Disable some tests projects.
- Add missing files in src/modules/rtp_rtcp/source/Android.mk
- Remove -DWEBRTC_MODULE_UTILITY_VIDEO in src/modules/utility/source/
Android.mk
- Remove calls to missing function "copy" in src/modules/rtp_rtcp/
source/rtp_packet_history.cc (Don't know if it has any impact)
- Remove ThreadPosix::SetAffinity in src/system_wrappers/source/
thread_posix.cc

Probably I'm forgetting something. Don't hesitate to ask for more
details or anything else.

Manjesh (GoCast)

unread,
Jan 24, 2012, 4:24:17 PM1/24/12
to discuss...@googlegroups.com
Hi Artem,

Regarding the "debug.pb.h" not being available, you have to run the executable 'protoc' to generate the file along with its .cpp counterpart, which is part of the protobuf-lite source.
I am actually using webrtc r1095, with Ubuntu 11.04 32 bit. I have managed to get the voice engine test to run on my nexus. I am still in the process of getting the entire
webrtc source to build. Please let me know if you have any specific questions.

- Manjesh
--
Manjesh Malavalli

Artem

unread,
Jan 25, 2012, 5:18:44 AM1/25/12
to discuss...@googlegroups.com
Thanks, Gustavo and Manjesh.
I applied almost all of your changes and got the following error:

artem@artem-nb:~/Development/eclipse_workspaces/webrtc/webrtctest$ ndk-build
Compile++ thumb  : webrtc_jpeg <= jpeg.cc
In file included from jni/src/common_video/jpeg/main/source/jpeg.cc:24:
jni/src/common_video/jpeg/main/source/data_manager.h:23:21: error: jpeglib.h: No such file or directory

Then I commented "libwebrtc_jpeg" out in Android.mk for further investigation and then got the folloing:

artem@artem-nb:~/Development/eclipse_workspaces/webrtc/webrtctest$ ndk-build
SharedLibrary  : libwebrtc_audio_preprocessing.so

./obj/local/armeabi/libwebrtc_apm.a(audio_processing_impl.o): In function `std::__node_alloc::deallocate(void*, unsigned int)':
/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: undefined reference to `std::__node_alloc::_M_deallocate(void*, unsigned int)'
/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: undefined reference to `std::__node_alloc::_M_deallocate(void*, unsigned int)'
/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/stlport/stlport/stl/_alloc.h:161: undefined reference to `std::__node_alloc::_M_deallocate(void*, unsigned int)'

Did I forget something?

After adding:
LOCAL_LDLIBS = -L/home/artem/Development/android-sdks/android-ndk-r7/sources/cxx-stl/stlport/libs/armeabi -lstlport_static -Wl,-z,muldefs

Actually I don't know why we need it, but I got the following:

artem@artem-nb:~/Development/eclipse_workspaces/webrtc/webrtctest$ ndk-build
SharedLibrary  : libwebrtc_audio_preprocessing.so
SharedLibrary  : libwebrtc.so
./obj/local/armeabi/libwebrtc_audio_device.a(audio_device_android_opensles.o): In function `webrtc::AudioDeviceAndroidOpenSLES::InitPlayout()':
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_ENVIRONMENTALREVERB'
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_NULL'


Thanks,
Artem

Artem

unread,
Jan 25, 2012, 6:54:00 AM1/25/12
to discuss...@googlegroups.com
Tried to turn "WEBRTC_ANDROID_OPENSLES" feature off and got the following:

StaticLibrary  : libwebrtc_aecm.a
SharedLibrary  : libwebrtc_audio_preprocessing.so
SharedLibrary  : libwebrtc.so
./obj/local/armeabi/libwebrtc_audio_device.a(audio_device_impl.o): In function `webrtc::AudioDeviceModuleImpl::CreatePlatformSpecificObjects()':
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/audio_device_impl.cc:273: undefined reference to `webrtc::AudioDeviceAndroidJni::AudioDeviceAndroidJni(int)'

./obj/local/armeabi/libwebrtc_audio_device.a(audio_device_android_opensles.o): In function `webrtc::AudioDeviceAndroidOpenSLES::InitPlayout()':
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_ENVIRONMENTALREVERB'

And I found that feature "WEBRTC_TARGET_PC" is used in many places - wondering should I remove this feature from Android.mk files?

Thanks,
Artem

Artem

unread,
Jan 25, 2012, 7:14:59 AM1/25/12
to discuss...@googlegroups.com
Tried to turn "WEBRTC_TARGET_PC" off - the same result.

Artem

unread,
Jan 25, 2012, 7:54:36 AM1/25/12
to discuss...@googlegroups.com
Thanks Manjesh,
Could you please give me some kind of example how to run 'protoc' - I can't find it in my project and don't even know who 'protoc' is and how to deal with it. And I guess I should specify desired target (PC or Android) somewhere.

I stuck currently with the following and on other forum people say that 'protoc' helped.

Compile++ arm    : webrtc_video_processing <= video_processing_impl.cc
StaticLibrary  : libwebrtc_video_processing.a
SharedLibrary  : libwebrtc.so

./obj/local/armeabi/libwebrtc_audio_device.a(audio_device_android_opensles.o): In function `webrtc::AudioDeviceAndroidOpenSLES::InitPlayout()':
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_ENVIRONMENTALREVERB'
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_NULL'
/home/artem/Development/eclipse_workspaces/webrtc/webrtctest/jni/src/modules/audio_device/main/source/android/audio_device_android_opensles.cc:1019: undefined reference to `SL_IID_BUFFERQUEUE'


Thanks
Artem

Artem

unread,
Jan 26, 2012, 8:57:00 AM1/26/12
to discuss...@googlegroups.com
Finally I've got it compiled (except video support). Not sure whether it works, but compiled at least.
Thanks for help.

Artem

arik

unread,
Feb 16, 2012, 1:41:26 PM2/16/12
to discuss...@googlegroups.com
Artem, 

Can you please describe how you solved the problem with the missing reference to SL_IID_ENVIRONMENTALREVERB?

Thanks,
Arik

arik

unread,
Feb 20, 2012, 11:56:42 AM2/20/12
to discuss...@googlegroups.com
Just found the issue: I needed to add LOCAL_LDLIBS +=-lOpenSLES

After playing around with the makefiles I finaly got AndroidTest project to work and I am now able to make a conversation between two Android phones over my WiFi :)

Has anyone compiled the Video modules already?

Arik

Manjesh (GoCast)

unread,
Mar 8, 2012, 9:46:53 PM3/8/12
to discuss...@googlegroups.com
Hi Everyone,

I have successfully built and audio-only version of PeerConnectionClient example fo Android. When I start a call, libjingle goes through its usual routine of creating stun ports and finding out the best path. Since both my devices are on the same LAN, it chooses the LAN path, and the peers send STUN pings to one another. Ideally at least one of them should receive an ACK packet back. But it looks like that's not happening. As a result, the connection is deleted after a timeout.

Has anybody else grappled with this issue while building for Android? Any insight in this regard is tremendously helpful.

- Manjesh

Zhihong GUO

unread,
Mar 20, 2012, 2:38:06 AM3/20/12
to discuss-webrtc
Hi Manjesh,

Could you please tell how to get the PeerConnectClient source code for
Android? I download webrtc source code but no source codes in
peerconnection folder.

I build webrtc for Android by ndk and its Android.mk files. Now I can
run the apk built from src/voice_engine/main/test/android_test/, but
the apk seems not rely on peerconnection, so that I what to build a
new webrtc package support peerconnection.

BR

James

David Narvaez

unread,
Mar 21, 2012, 11:59:31 AM3/21/12
to discuss...@googlegroups.com
On Tue, Mar 20, 2012 at 1:38 AM, Zhihong GUO <gzh...@gmail.com> wrote:
Hi Manjesh,

Could you please tell how to get the PeerConnectClient source code for
Android? I download webrtc source code but no source codes in
peerconnection folder.

I build webrtc for Android by ndk and its Android.mk files. Now I can
run the apk built from src/voice_engine/main/test/android_test/, but
the apk seems not rely on peerconnection, so that I what to build a
new webrtc package support peerconnection.

You can get example client and server code from


but it is oriented towards Windows or Linux, no Android AFAIK. You could still see the difference between those two implementations and guess what you need to implement in order to have an Android client.

David E. Narvaez 

Michaela Tepete

unread,
Apr 2, 2012, 11:20:32 AM4/2/12
to discuss...@googlegroups.com
Hello all. Thank you for your help so far.

I am trying to compile WEBRTC for android but unfortunately i am getting this error.

SharedLibrary  : libwebrtc_audio_preprocessing.so
C:/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/ar
m-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot f
ind -lstlport_static
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libwebrtc_audio_preprocessing.so] Error 1

Does anyone have an idea about what to do?

Manjesh (GoCast)

unread,
Apr 3, 2012, 3:28:14 PM4/3/12
to discuss...@googlegroups.com
Hi Michaela,

Are you using the ndk-build command?
--
Manjesh Malavalli
Message has been deleted
Message has been deleted

Brijesh Thakur

unread,
May 15, 2012, 1:51:49 PM5/15/12
to discuss...@googlegroups.com
Hi,

Thank you all for helping out compile WebRTC code.

After Compiling I am getting error

D:/android-ndk-r8-windows/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/
prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linu
x-androideabi/bin/ld.exe: cannot find -lstlport_static

collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libwebrtc_audio_preprocessing.so] Error 1

I am using ndk-build command to compile.

I am using 
WebRCT version  : apm-buffer
NDK : Android r8

Please help me out what is missing now ?

Thanks,
Brijesh
Message has been deleted

Brijesh Thakur

unread,
May 16, 2012, 11:25:40 AM5/16/12
to discuss...@googlegroups.com
Hi Gustavo,

How to disable rtti. I am facing the same issue.
Message has been deleted

Luke Weber

unread,
May 21, 2012, 5:29:47 AM5/21/12
to discuss...@googlegroups.com
Hey, 

I posted a message with my diff and the libs, but it got deleted immediately, would be nice if they just stripped attachments or didn't allow it to begin with as I had a bit of instruction in it, which is now lost. Moderator?

Anyhow, the diff from what I did, as well as compiled libs that could be used directly, are located here:

I finally got around using static for libstlport, but I think it might have been related to actually using libstlport_shared explicitly in my android.mk, as it was previously just libstlport.

Best of luck,
Luke

Brijesh Thakur

unread,
May 22, 2012, 2:08:27 AM5/22/12
to discuss...@googlegroups.com
Thansk a ton Manjesh , Artem , Gustavo , Luke.

I have successfully compiled and tested on Android Device. I am able to run Android Test as well to Communicate between two devices over Wifi.

Luke Weber

unread,
May 22, 2012, 9:35:41 AM5/22/12
to discuss...@googlegroups.com
As a semi-natural extension for me, that maybe not everyone has figured out yet.

This is an audio test, meaning the two clients don't support any fancy peer to peer stuff, just opening up RTP streams between each other on the same network.

So where to from here, two options for me:
1) Change the peerconnection client examples to compile some functionality into this test and try that out. The downside here is that webrtc uses roap and jsep, and hasn't fully implemented ICE, ie it's missing TURN(relay server) support(http://code.google.com/p/webrtc/issues/detail?id=278), which is 8% of your clients if you believe libjingle's stats.
2) Try to figure out how to use the libjingle client for signalling and ICE, and webrtc's voice engine. The obvious first problem here, is that webrtc is into managing it's RTP streams inside the voice engine, and libjingle also seems to have it's RTP streams as part of it's ICE client/session logic. In this sense, I'm not yet really sure where to start.

Anyone have any thoughts on point 2, specifically the best way to merge these two projects to use libjingle as a client and webrtc as the audio engine. 

Luke
Message has been deleted

Mamadou

unread,
Aug 3, 2012, 12:20:41 PM8/3/12
to discuss-webrtc
For the signaling protocol: http://tools.ietf.org/html/draft-uberti-rtcweb-jsep-02
No you cannot call SIP clients
For info, the Android chrome version don't support webrtc yet (at
least the part you're insterested in: Peerconnection).
If you want to know what it's possible to do with WebRTC/SIP combo:
http://code.google.com/p/sipml5/

On Aug 3, 12:17 pm, john_conor <aneeb...@gmail.com> wrote:
> Hi all,
>
> I had a couple of quick doubts:
>
> What is the signalling protocol is used in webRtc?
> Can the webRtc sample for android be used to make calls to SIP clients?
>
> I am interested in making voice only calls but I need the android
> application to interact with an embedded SIP client that we already have. I
> would appreciate any pointers in this regard.
>
> Thanks & regards,
> Neeraj

Luke Weber

unread,
Dec 4, 2012, 4:43:02 PM12/4/12
to discuss...@googlegroups.com
gyp doesn't do the cross compile for mac correctly without a bit of patching, and Android.mk files seem to never fully be up to date. 

You can check out my project to see one option where you could build it by maintaining Android.mk files for example. I also did have the gyp system working, but haven't tested it in a while, and gave up on it as a primary option because it was too much hassle to maintain two.


Luke


On Tue, Dec 4, 2012 at 3:56 PM, abul walid <wali...@gmail.com> wrote:


On Monday, October 29, 2012 4:47:44 PM UTC+5:30, Sunil Chandrasekharan wrote:
Hello All,

i was reading the topic and the discussion in this thread.

I also have the same requirement as Manjesh. I am working on a project that involves building WebRTC for Android.  I am creating a video chat application which works between 2 android devices or from PC to android devices.

Kindly help me in achieving (creating apk and running on android tablet)

i followed this link:
http://www.webrtc.org/reference/getting-started/

I downloaded the code from the webrtc and installed on Ubuntu linux. I build it succesfully .

i got a trunk folder with webrtc directory. Inside that i could find android sample app in:
trunk/webrtc/video_engine/test/android

also i found another folder Peer connection. Inside that i build the code and got peerconnection_client and peerconnection_server apps.

I wish to run this on android device.

1. which is the folder/directoy where i can get the app for android
2. do i need to build using ndk command?
3. how can i do a videochat on the android device with the sample app provided.

any support in this would help me achieve things on android devices



On Friday, December 30, 2011 12:13:27 AM UTC+5:30, Manjesh (GoCast) wrote:
Hi everyone,

I am working on a project that involves building WebRTC for Android. While going through the posts on this group, I've come across some members who have been able to build WebRTC for Android successfully. Since I didn't find any descriptive post as to how to build for Android, I have started this thread in the hopes of making it a one stop information shop for people interested in building WebRTC for Android. Let me start of the discussion by putting up the following questions to members who have successfully built WebRTC for Android:

1. What revision of the WebRTC source did you use?
2. What version of Android source/ndk did you use?
3. Is the ndk alone sufficient to build WebRTC or do you need the complete Android source code?

It would also be of great help if you could describe the steps you took to get WebRTC to build on Android.

Thanks,

Manjesh


Hi All,
anyone please give help.
I have tried to build on Mac.
tried ndk-build inside android_test directory but it shows Error:

make: *** No rule to make target `jni/../../../../../../../src/modules/rtp_rtcp/source/bandwidth_management.cc', needed by `obj/local/armeabi/objs-debug/webrtc_rtp_rtcp/bandwidth_management.o'.  Stop.

tried to build video_engine as well but shows more errors..

Please help

Thanks
Abul Walid 

--
 
 
 

abul walid

unread,
Dec 5, 2012, 7:07:42 AM12/5/12
to discuss...@googlegroups.com
Hi,
Thanks for your reply. It helped me.
Now I am getting this Error

Using SDK build
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Warning: Current directory is out of CHROME_SRC, it may not be the one you want.

-bash: /build/android/adb_device_functions.sh: No such file or directory


Does it need chrome source while building for android. is there anything else that I am missing out.
Please help.

Thanks
Abul Walid

Luke Weber

unread,
Dec 5, 2012, 7:29:16 AM12/5/12
to discuss...@googlegroups.com

Check out build/andoid/envsetup.sh in my project.

--
 
 
 

abul walid

unread,
Dec 5, 2012, 11:00:52 AM12/5/12
to discuss...@googlegroups.com
Hi,
In github looks like your build directory is empty. Please check.

Thanks

Luke Weber

unread,
Dec 5, 2012, 11:17:44 AM12/5/12
to discuss...@googlegroups.com
mac_readlink =================

#!/bin/sh

TARGET_FILE=$1

cd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`

LOOPS=0
# Iterate down a (possible) chain of symlinks
while [ -L "$TARGET_FILE" ]
do
    TARGET_FILE=`readlink $TARGET_FILE`
    cd `dirname $TARGET_FILE`
    TARGET_FILE=`basename $TARGET_FILE`
    if [ "$LOOPS" -gt 100 ]
      then
        echo "Possible Simlink cycle, looped 100 times, exiting"
        exit 1
    fi
    let LOOPS++
done

===================================================================
--- android/envsetup.sh (revision 169394)
+++ android/envsetup.sh (working copy)
@@ -56,17 +56,19 @@
 
 case "${host_os}" in
   "linux")
-    toolchain_dir="linux-${host_arch}"
+    toolchain_dir="linux-x86"
+    rlink_command="readlink -f"
     ;;
   "mac")
-    toolchain_dir="darwin-${host_arch}"
+    toolchain_dir="darwin-x86"
+    rlink_command="./build/android/mac_readlink"
     ;;
   *)
     echo "Host platform ${host_os} is not supported" >& 2
     return 1
 esac
 
-CURRENT_DIR="$(readlink -f "$(dirname $BASH_SOURCE)/../../")"
+CURRENT_DIR="$(${rlink_command} "$(dirname $BASH_SOURCE)/../../")"
 if [[ -z "${CHROME_SRC}" ]]; then
   # If $CHROME_SRC was not set, assume current directory is CHROME_SRC.
   export CHROME_SRC="${CURRENT_DIR}"


--
 
 
 

abul walid

unread,
Dec 5, 2012, 11:34:12 AM12/5/12
to discuss...@googlegroups.com
Hi,
Looks like my SDK and NDK are in path but I get this when I tried to give $ ./build/android/envsetup.sh

ANDROID_NDK_ROOT must be set to the path of Android NDK, Revision 6b.
which could be installed by
<chromium_tree>/src/build/install-build-deps-android-sdk.sh
./build/android/envsetup.sh: line 23: return: can only `return' from a function or sourced script
ANDROID_SDK_ROOT must be set to the path of Android SDK, Android 3.2.
which could be installed by
<chromium_tree>/src/build/install-build-deps-android-sdk.sh
./build/android/envsetup.sh: line 31: return: can only `return' from a function or sourced script
TARGET_PRODUCT: trygon is not supported.
./build/android/envsetup.sh: line 64: return: can only `return' from a function or sourced script
Can not find Android toolchain in /third_party/android_tools/ndk//toolchains//prebuilt//darwin-x86/bin/.
The NDK version might be wrong.
./build/android/envsetup.sh: line 81: return: can only `return' from a function or sourced script


Thanks

Luke Weber

unread,
Dec 5, 2012, 11:39:02 AM12/5/12
to discuss...@googlegroups.com
Probably the environment setup is partially applicable from the readme on my project. Beyond that, it's always a bit of a hack.


On Wed, Dec 5, 2012 at 5:34 PM, abul walid <wali...@gmail.com> wrote:
envsetup

abul walid

unread,
Dec 6, 2012, 4:53:00 AM12/6/12
to discuss...@googlegroups.com
Hi,
Thank you for your help, but still no luck.
I have checked all sdk and ndk tools work from terminal, so environment is set.
No I cant understand what else hack that I have to do to get this stuff to work.

I am using a mac machine with Mountain Lion

Thanks

Leo Wang

unread,
Dec 6, 2012, 12:29:37 PM12/6/12
to discuss...@googlegroups.com
We only support LINUX as the host right now. I don't recommend that
you spend too much time on hacking Mac.

Also, please let me make clear, if you want to build full webrtc
stack, please follow the instructions at www.webrtc.org, check android
section.
https://sites.google.com/site/webrtc/reference/getting-started/prerequisite-sw
https://sites.google.com/site/webrtc/reference/getting-started

You should use gyp which is also used by chromium. Please post
question if it doesn't work. We don't support anything other than it
right now.

Thanks
> --
>
>
>

Luke Weber

unread,
Dec 7, 2012, 7:28:27 AM12/7/12
to discuss...@googlegroups.com
Would be cool if there was some mac support. Some stuff is just broken in chromium, where it's obviously trying to support mac, but the case just doesn't work. 

I've attached a patch. I've removed video haphazardly. I assume video code isn't compiling because the gas*.pl scripts aren't working on mac for libvpx, but didn't have time to look further, but you can reenable video, compiling vpx etc if you want to give it a shot.

As far as the audio demo, I made some changes, but realized it's just bogus.
Basically, adapt webrtc/voice_engine/test/android/android_test/jni/Android.mk to the format of video engine if you want webrtc/video_engine/test/android/android_test/jni/Android.mk, which just pulls the statics our of the out/build directory from gyp.

Other option is figure out where the build breaks, build the whole thing, then use the video demo, which seems to be maintained.

Luke
webrtcmac.patch

amit kumar Verma

unread,
May 9, 2013, 8:39:33 AM5/9/13
to discuss...@googlegroups.com


On Friday, December 30, 2011 12:13:27 AM UTC+5:30, Manjesh (GoCast) wrote:
Hi everyone,

I am working on a project that involves building WebRTC for Android. While going through the posts on this group, I've come across some members who have been able to build WebRTC for Android successfully. Since I didn't find any descriptive post as to how to build for Android, I have started this thread in the hopes of making it a one stop information shop for people interested in building WebRTC for Android. Let me start of the discussion by putting up the following questions to members who have successfully built WebRTC for Android:

1. What revision of the WebRTC source did you use?
2. What version of Android source/ndk did you use?
3. Is the ndk alone sufficient to build WebRTC or do you need the complete Android source code?

It would also be of great help if you could describe the steps you took to get WebRTC to build on Android.

Thanks,

Manjesh


same problem 

Maulik Prabhudesai

unread,
May 9, 2013, 8:43:41 AM5/9/13
to discuss...@googlegroups.com
1. The one mentioned on WebRTC-getting started web page
2. the latest ndk
3. what do you mean by Android source code ? if you mean SDK also the latest.


Hartelijke groeten /Warm regards /शुभेच्छा 

Maulik Prabhudesai 
m.prab...@student.tudelft.nl
MSc student, EWI, TU-Delft


--
 
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rob Pickering

unread,
May 9, 2013, 10:02:31 AM5/9/13
to discuss...@googlegroups.com
Whilst there are instructions for building WebRTC on Android, and they do work, it is a non-trivial job getting the build environment up and running in the first place if you aren't already an Android developer.

If all you need is a working WebRTC testbed on Android, the current Chrome Beta includes WebRTC behind a flag. If that is a recent enough implementation for your purposes then it will save you a *lot* of work.

--
    Rob.

amit kumar Verma

unread,
May 10, 2013, 6:02:31 AM5/10/13
to discuss...@googlegroups.com, brijes...@gmail.com
Hi,

pls give me discription to how compile and run webrtc project on android device .pls provide me link to download webrtc project.
Regards
amit
Reply all
Reply to author
Forward
0 new messages