Split video engine android initialization into each internal module initialization.

This is to later on allow targets to pick at link time if to include the external or internal implementation. In order to do that the video_engine cannot compile different based on which option is picked later on.

BUG=3768,3770
R=glaznev@webrtc.org, stefan@webrtc.org
TBR=henrike@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/25529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7208 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/app/webrtc/java/jni/peerconnection_jni.cc b/app/webrtc/java/jni/peerconnection_jni.cc
index de1836d..9a7c8ad 100644
--- a/app/webrtc/java/jni/peerconnection_jni.cc
+++ b/app/webrtc/java/jni/peerconnection_jni.cc
@@ -90,6 +90,8 @@
 
 #if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
 #include <android/log.h>
+#include "webrtc/modules/video_capture/video_capture_internal.h"
+#include "webrtc/modules/video_render/video_render_internal.h"
 #include "webrtc/system_wrappers/interface/logcat_trace_context.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 using webrtc::CodecSpecificInfo;
@@ -2765,8 +2767,10 @@
   CHECK(g_jvm) << "JNI_OnLoad failed to run?";
   bool failure = false;
   if (!factory_static_initialized) {
-    if (initialize_video)
-      failure |= webrtc::VideoEngine::SetAndroidObjects(g_jvm, context);
+    if (initialize_video) {
+      failure |= webrtc::SetCaptureAndroidVM(g_jvm, context);
+      failure |= webrtc::SetRenderAndroidVM(g_jvm);
+    }
     if (initialize_audio)
       failure |= webrtc::VoiceEngine::SetAndroidObjects(g_jvm, jni, context);
     factory_static_initialized = true;