Misc cleanups to webrtc/android code:
- Replace some deprecated calls/enums with their more modern equivalents. - Clean up some usage of global data and/or hide it better - Catch specific exceptions instead of Exception, and log the exception instead of just its message. - Random log message cleanups - Added a build_with_libjingle gyp variable to mimic build_with_chromium for when webrtc is built as part of a libjingle project but not part of chromium. BUG=webrtc:1169 TEST=none Review URL: https://webrtc-codereview.appspot.com/1105010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3554 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -112,9 +112,20 @@ WebRtc_Word32 VideoCaptureAndroid::SetAndroidObjects(void* javaVM,
|
||||
return -1;
|
||||
}
|
||||
|
||||
jclass capabilityClassLocal = env->FindClass(
|
||||
"org/webrtc/videoengine/CaptureCapabilityAndroid");
|
||||
if (!capabilityClassLocal) {
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,
|
||||
"%s: could not find java class", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
jclass capabilityClassGlobal = reinterpret_cast<jclass>(env->NewGlobalRef(
|
||||
capabilityClassLocal));
|
||||
DeviceInfoAndroid::SetAndroidCaptureClasses(capabilityClassGlobal);
|
||||
|
||||
// get java capture class type (note path to class packet)
|
||||
jclass javaCmDevInfoClassLocal = env->FindClass(
|
||||
AndroidJavaCaptureDeviceInfoClass);
|
||||
"org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid");
|
||||
if (!javaCmDevInfoClassLocal) {
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,
|
||||
"%s: could not find java class", __FUNCTION__);
|
||||
|
||||
Reference in New Issue
Block a user