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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 jobject j_candidate = jni()->NewObject(candidate_class, ctor, j_mid, | 195 jobject j_candidate = jni()->NewObject(candidate_class, ctor, j_mid, |
196 candidate->sdp_mline_index(), j_sdp); | 196 candidate->sdp_mline_index(), j_sdp); |
197 CHECK_EXCEPTION(jni()) << "error during NewObject"; | 197 CHECK_EXCEPTION(jni()) << "error during NewObject"; |
198 jmethodID m = GetMethodID(jni(), *j_observer_class_, | 198 jmethodID m = GetMethodID(jni(), *j_observer_class_, |
199 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V"); | 199 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V"); |
200 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate); | 200 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate); |
201 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 201 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
202 } | 202 } |
203 | 203 |
204 void OnIceCandidatesRemoved( | 204 void OnIceCandidatesRemoved( |
205 const std::vector<cricket::Candidate>& candidates) override { | 205 const std::vector<cricket::Candidate>& candidates) { |
206 ScopedLocalRefFrame local_ref_frame(jni()); | 206 ScopedLocalRefFrame local_ref_frame(jni()); |
207 jobjectArray candidates_array = ToJavaCandidateArray(jni(), candidates); | 207 jobjectArray candidates_array = ToJavaCandidateArray(jni(), candidates); |
208 jmethodID m = | 208 jmethodID m = |
209 GetMethodID(jni(), *j_observer_class_, "onIceCandidatesRemoved", | 209 GetMethodID(jni(), *j_observer_class_, "onIceCandidatesRemoved", |
210 "([Lorg/webrtc/IceCandidate;)V"); | 210 "([Lorg/webrtc/IceCandidate;)V"); |
211 jni()->CallVoidMethod(*j_observer_global_, m, candidates_array); | 211 jni()->CallVoidMethod(*j_observer_global_, m, candidates_array); |
212 CHECK_EXCEPTION(jni()) << "Error during CallVoidMethod"; | 212 CHECK_EXCEPTION(jni()) << "Error during CallVoidMethod"; |
213 } | 213 } |
214 | 214 |
215 void OnSignalingChange( | 215 void OnSignalingChange( |
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 return JavaStringFromStdString( | 2206 return JavaStringFromStdString( |
2207 jni, | 2207 jni, |
2208 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2208 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
2209 } | 2209 } |
2210 | 2210 |
2211 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2211 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
2212 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2212 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
2213 } | 2213 } |
2214 | 2214 |
2215 } // namespace webrtc_jni | 2215 } // namespace webrtc_jni |
OLD | NEW |