webrtc-jingle-client icon indicating copy to clipboard operation
webrtc-jingle-client copied to clipboard

Add Video support

Open lukeweber opened this issue 12 years ago • 5 comments

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.

lukeweber avatar Dec 06 '12 22:12 lukeweber

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 avatar Dec 07 '12 08:12 dmonakhov

@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 ?

tbruyelle avatar Dec 07 '12 08:12 tbruyelle

Yes, you forget to build jni part. I've build all stuff like that

  1. build whole webrtc project via GYP tools

  2. cd webrtc/video_engine/test/android

  3. cd jni ; ndk-build

  4. cd ../ build-java-project

dmonakhov avatar Dec 07 '12 09:12 dmonakhov

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.

tbruyelle avatar Dec 07 '12 16:12 tbruyelle

So this isn't by any means the full solution, but I did get a bit of progress.

  1. Added target ./android/voice-client-core/jni/default_debug_video.mk
  2. Added video specific drivers in src/main/java/org/webrtc/videoengine/...
  3. 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):

  1. Add default_debug_video as a target in tools/badit_android.sh

  2. Integrate the targets, conditionally based on video flag, into the file Android.mk correctly, and verify they all build correctly.

  3. 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.

lukeweber avatar Dec 11 '12 16:12 lukeweber