| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright 2013 The WebRTC project authors. All Rights Reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 877       binary)); | 877       binary)); | 
| 878   jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); | 878   jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); | 
| 879   return ret; | 879   return ret; | 
| 880 } | 880 } | 
| 881 | 881 | 
| 882 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { | 882 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { | 
| 883   CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); | 883   CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); | 
| 884 } | 884 } | 
| 885 | 885 | 
| 886 JOW(void, Logging_nativeEnableTracing)( | 886 JOW(void, Logging_nativeEnableTracing)( | 
| 887     JNIEnv* jni, jclass, jstring j_path, jint nativeLevels, | 887     JNIEnv* jni, jclass, jstring j_path, jint nativeLevels) { | 
| 888     jint nativeSeverity) { |  | 
| 889   std::string path = JavaToStdString(jni, j_path); | 888   std::string path = JavaToStdString(jni, j_path); | 
| 890   if (nativeLevels != webrtc::kTraceNone) { | 889   if (nativeLevels != webrtc::kTraceNone) { | 
| 891     webrtc::Trace::set_level_filter(nativeLevels); | 890     webrtc::Trace::set_level_filter(nativeLevels); | 
| 892     if (path != "logcat:") { | 891     if (path != "logcat:") { | 
| 893       RTC_CHECK_EQ(0, webrtc::Trace::SetTraceFile(path.c_str(), false)) | 892       RTC_CHECK_EQ(0, webrtc::Trace::SetTraceFile(path.c_str(), false)) | 
| 894           << "SetTraceFile failed"; | 893           << "SetTraceFile failed"; | 
| 895     } else { | 894     } else { | 
| 896       // Intentionally leak this to avoid needing to reason about its lifecycle. | 895       // Intentionally leak this to avoid needing to reason about its lifecycle. | 
| 897       // It keeps no state and functions only as a dispatch point. | 896       // It keeps no state and functions only as a dispatch point. | 
| 898       static LogcatTraceContext* g_trace_callback = new LogcatTraceContext(); | 897       static LogcatTraceContext* g_trace_callback = new LogcatTraceContext(); | 
| 899     } | 898     } | 
| 900   } | 899   } | 
| 901   if (nativeSeverity >= rtc::LS_SENSITIVE && nativeSeverity <= rtc::LS_ERROR) { | 900 } | 
|  | 901 | 
|  | 902 JOW(void, Logging_nativeEnableLogToDebugOutput) | 
|  | 903     (JNIEnv *jni, jclass, jint nativeSeverity) { | 
|  | 904   if (nativeSeverity >= rtc::LS_SENSITIVE && nativeSeverity <= rtc::LS_NONE) { | 
| 902     rtc::LogMessage::LogToDebug( | 905     rtc::LogMessage::LogToDebug( | 
| 903         static_cast<rtc::LoggingSeverity>(nativeSeverity)); | 906         static_cast<rtc::LoggingSeverity>(nativeSeverity)); | 
| 904   } | 907   } | 
| 905 } | 908 } | 
| 906 | 909 | 
| 907 JOW(void, Logging_nativeEnableLogThreads)(JNIEnv* jni, jclass) { | 910 JOW(void, Logging_nativeEnableLogThreads)(JNIEnv* jni, jclass) { | 
| 908   rtc::LogMessage::LogThreads(true); | 911   rtc::LogMessage::LogThreads(true); | 
| 909 } | 912 } | 
| 910 | 913 | 
| 911 JOW(void, Logging_nativeEnableLogTimeStamps)(JNIEnv* jni, jclass) { | 914 JOW(void, Logging_nativeEnableLogTimeStamps)(JNIEnv* jni, jclass) { | 
| (...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2288   return JavaStringFromStdString( | 2291   return JavaStringFromStdString( | 
| 2289       jni, | 2292       jni, | 
| 2290       reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2293       reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 
| 2291 } | 2294 } | 
| 2292 | 2295 | 
| 2293 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2296 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 
| 2294   reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2297   reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 
| 2295 } | 2298 } | 
| 2296 | 2299 | 
| 2297 }  // namespace webrtc_jni | 2300 }  // namespace webrtc_jni | 
| OLD | NEW | 
|---|