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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 65 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
66 #include "webrtc/system_wrappers/include/field_trial.h" | 66 #include "webrtc/system_wrappers/include/field_trial.h" |
67 #include "webrtc/pc/webrtcsdp.h" | 67 #include "webrtc/pc/webrtcsdp.h" |
68 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" | 68 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" |
69 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" | 69 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" |
70 #include "webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h" | 70 #include "webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h" |
71 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" | 71 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" |
72 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" | 72 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
73 #include "webrtc/sdk/android/src/jni/jni_helpers.h" | 73 #include "webrtc/sdk/android/src/jni/jni_helpers.h" |
74 #include "webrtc/sdk/android/src/jni/native_handle_impl.h" | 74 #include "webrtc/sdk/android/src/jni/native_handle_impl.h" |
| 75 #include "webrtc/sdk/android/src/jni/rtcstatscollectorcallbackwrapper.h" |
75 #include "webrtc/system_wrappers/include/field_trial_default.h" | 76 #include "webrtc/system_wrappers/include/field_trial_default.h" |
76 #include "webrtc/system_wrappers/include/logcat_trace_context.h" | 77 #include "webrtc/system_wrappers/include/logcat_trace_context.h" |
77 #include "webrtc/system_wrappers/include/trace.h" | 78 #include "webrtc/system_wrappers/include/trace.h" |
78 #include "webrtc/voice_engine/include/voe_base.h" | 79 #include "webrtc/voice_engine/include/voe_base.h" |
79 | 80 |
80 using cricket::WebRtcVideoDecoderFactory; | 81 using cricket::WebRtcVideoDecoderFactory; |
81 using cricket::WebRtcVideoEncoderFactory; | 82 using cricket::WebRtcVideoEncoderFactory; |
82 using rtc::Bind; | 83 using rtc::Bind; |
83 using rtc::Thread; | 84 using rtc::Thread; |
84 using rtc::ThreadManager; | 85 using rtc::ThreadManager; |
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 j_rtp_receiver_ctor, nativeReceiverPtr); | 2115 j_rtp_receiver_ctor, nativeReceiverPtr); |
2115 CHECK_EXCEPTION(jni) << "error during NewObject"; | 2116 CHECK_EXCEPTION(jni) << "error during NewObject"; |
2116 // Receiver is now owned by Java object, and will be freed from there. | 2117 // Receiver is now owned by Java object, and will be freed from there. |
2117 receiver->AddRef(); | 2118 receiver->AddRef(); |
2118 jni->CallBooleanMethod(j_receivers, j_array_list_add, j_receiver); | 2119 jni->CallBooleanMethod(j_receivers, j_array_list_add, j_receiver); |
2119 CHECK_EXCEPTION(jni) << "error during CallBooleanMethod"; | 2120 CHECK_EXCEPTION(jni) << "error during CallBooleanMethod"; |
2120 } | 2121 } |
2121 return j_receivers; | 2122 return j_receivers; |
2122 } | 2123 } |
2123 | 2124 |
2124 JOW(bool, PeerConnection_nativeGetStats)( | 2125 JOW(bool, PeerConnection_nativeOldGetStats) |
2125 JNIEnv* jni, jobject j_pc, jobject j_observer, jlong native_track) { | 2126 (JNIEnv* jni, jobject j_pc, jobject j_observer, jlong native_track) { |
2126 rtc::scoped_refptr<StatsObserverWrapper> observer( | 2127 rtc::scoped_refptr<StatsObserverWrapper> observer( |
2127 new rtc::RefCountedObject<StatsObserverWrapper>(jni, j_observer)); | 2128 new rtc::RefCountedObject<StatsObserverWrapper>(jni, j_observer)); |
2128 return ExtractNativePC(jni, j_pc)->GetStats( | 2129 return ExtractNativePC(jni, j_pc)->GetStats( |
2129 observer, | 2130 observer, |
2130 reinterpret_cast<MediaStreamTrackInterface*>(native_track), | 2131 reinterpret_cast<MediaStreamTrackInterface*>(native_track), |
2131 PeerConnectionInterface::kStatsOutputLevelStandard); | 2132 PeerConnectionInterface::kStatsOutputLevelStandard); |
2132 } | 2133 } |
2133 | 2134 |
| 2135 JOW(void, PeerConnection_nativeNewGetStats) |
| 2136 (JNIEnv* jni, jobject j_pc, jobject j_callback) { |
| 2137 rtc::scoped_refptr<RTCStatsCollectorCallbackWrapper> callback( |
| 2138 new rtc::RefCountedObject<RTCStatsCollectorCallbackWrapper>(jni, |
| 2139 j_callback)); |
| 2140 ExtractNativePC(jni, j_pc)->GetStats(callback); |
| 2141 } |
| 2142 |
2134 JOW(bool, PeerConnection_nativeStartRtcEventLog)( | 2143 JOW(bool, PeerConnection_nativeStartRtcEventLog)( |
2135 JNIEnv* jni, jobject j_pc, int file_descriptor, int max_size_bytes) { | 2144 JNIEnv* jni, jobject j_pc, int file_descriptor, int max_size_bytes) { |
2136 return ExtractNativePC(jni, j_pc)->StartRtcEventLog(file_descriptor, | 2145 return ExtractNativePC(jni, j_pc)->StartRtcEventLog(file_descriptor, |
2137 max_size_bytes); | 2146 max_size_bytes); |
2138 } | 2147 } |
2139 | 2148 |
2140 JOW(void, PeerConnection_nativeStopRtcEventLog)(JNIEnv* jni, jobject j_pc) { | 2149 JOW(void, PeerConnection_nativeStopRtcEventLog)(JNIEnv* jni, jobject j_pc) { |
2141 ExtractNativePC(jni, j_pc)->StopRtcEventLog(); | 2150 ExtractNativePC(jni, j_pc)->StopRtcEventLog(); |
2142 } | 2151 } |
2143 | 2152 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2727 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) | 2736 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) |
2728 ->inter_tone_gap(); | 2737 ->inter_tone_gap(); |
2729 } | 2738 } |
2730 | 2739 |
2731 JOW(void, DtmfSender_free) | 2740 JOW(void, DtmfSender_free) |
2732 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { | 2741 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { |
2733 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); | 2742 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); |
2734 } | 2743 } |
2735 | 2744 |
2736 } // namespace webrtc_jni | 2745 } // namespace webrtc_jni |
OLD | NEW |