webrtc-jingle-client
webrtc-jingle-client copied to clipboard
Add Video support
Add java video drivers, compile all video related deps into webrtc so it works.
Video from what I understand is still too slow for many phones. I think it would be nice to have as a build option to test out and use, making sure that if we don't build with it, we're not including all of the video deps and bloating our binary.
Getting it working would be based primarily on the video example in webrtc. I'm positivie Android.mk files in webrtc will be out of date and need some care.
I might be able to provide a baseline of this working in a different project if someone is interested in attacking it and adapting the webrtc example to ours.
I've able to build and run webrtc example http://git.chromium.org/gitweb/?p=external/webrtc.git;a=tree;f=webrtc/video_engine/test/android
And it works, but it has only VP8 codec, and I dont know how to enable other codecs (h264, h263)
@dmonakhov got java.lang.UnsatisfiedLinkError: Couldn't load webrtc-video-demo-jni: findLibrary returned null
when launching your app on my device (Nexus One 2.3.7). Does I miss something ?
Yes, you forget to build jni part. I've build all stuff like that
-
build whole webrtc project via GYP tools
-
cd webrtc/video_engine/test/android
-
cd jni ; ndk-build
-
cd ../ build-java-project
Thanks but i don't manage to pass the ndk-build
step. It seems a file has not been created correctly during the make
step :
$ ndk-build
Android NDK: ERROR:jni/Android.mk:audio_processing_neon: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../../../../../out/Debug/obj.target/webrtc/modules/libaudio_processing_neon.a exists or that its path is correct
/home/ubuntu/android-ndk-r8c/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
So this isn't by any means the full solution, but I did get a bit of progress.
- Added target ./android/voice-client-core/jni/default_debug_video.mk
- Added video specific drivers in src/main/java/org/webrtc/videoengine/...
- Added, necessary video targets, commented out in android/voice-client-core/jni/Android.mk
Next steps(on a linux machine - libvpx sucks for android cross compile on mac and gets stuck on gas script):
-
Add default_debug_video as a target in tools/badit_android.sh
-
Integrate the targets, conditionally based on video flag, into the file Android.mk correctly, and verify they all build correctly.
-
Then you'll need to call webrtc::VideoEngine::SetAndroidObjects(jvm, env, context); inside webrtc-jingle-client/trunk/client/helpers.cc. We currently call this method on VoiceEngine. I'm not sure if this is a replacement, or both would still need to be called.