summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorbraveyao@webrtc.org <braveyao@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-15 03:18:15 +0000
committerbraveyao@webrtc.org <braveyao@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-15 03:18:15 +0000
commitca2c70f2bae88987267a2727449ac86330fb8dbd (patch)
tree2a8ed2231421354a4a221c90f20fa40c4517c8c4 /examples
parentdd0f8b2a5f7fde0d8a515ea90bcf32fcad7ad230 (diff)
downloadwebrtc-ca2c70f2bae88987267a2727449ac86330fb8dbd.tar.gz
WebRTCDemo: couldn't run a second time. The reason is voe could register/unregister for each run, but vie would expect initialization only once per process.
This cl is to teach videocapture android how to deinitialize and allow it to be re-initializable. BUG=3284 TEST=ManualTest R=fischman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/15429004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6167 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'examples')
-rw-r--r--examples/android/media_demo/jni/on_load.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/android/media_demo/jni/on_load.cc b/examples/android/media_demo/jni/on_load.cc
index 27a2394b..9f9a0c7a 100644
--- a/examples/android/media_demo/jni/on_load.cc
+++ b/examples/android/media_demo/jni/on_load.cc
@@ -47,6 +47,8 @@ JOWW(void, NativeWebRtcContextRegistry_register)(
JOWW(void, NativeWebRtcContextRegistry_unRegister)(
JNIEnv* jni,
jclass) {
+ CHECK(webrtc::VideoEngine::SetAndroidObjects(NULL) == 0,
+ "Failed to unregister android objects from video engine");
CHECK(webrtc::VoiceEngine::SetAndroidObjects(NULL, NULL, NULL) == 0,
"Failed to unregister android objects from voice engine");
webrtc_examples::ClearVieDeviceObjects();