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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 DisposeRemoteStream(remote_streams_.begin()); | 238 DisposeRemoteStream(remote_streams_.begin()); |
239 while (!rtp_receivers_.empty()) | 239 while (!rtp_receivers_.empty()) |
240 DisposeRtpReceiver(rtp_receivers_.begin()); | 240 DisposeRtpReceiver(rtp_receivers_.begin()); |
241 } | 241 } |
242 | 242 |
243 void OnIceCandidate(const IceCandidateInterface* candidate) override { | 243 void OnIceCandidate(const IceCandidateInterface* candidate) override { |
244 ScopedLocalRefFrame local_ref_frame(jni()); | 244 ScopedLocalRefFrame local_ref_frame(jni()); |
245 std::string sdp; | 245 std::string sdp; |
246 RTC_CHECK(candidate->ToString(&sdp)) << "got so far: " << sdp; | 246 RTC_CHECK(candidate->ToString(&sdp)) << "got so far: " << sdp; |
247 jclass candidate_class = FindClass(jni(), "org/webrtc/IceCandidate"); | 247 jclass candidate_class = FindClass(jni(), "org/webrtc/IceCandidate"); |
248 jmethodID ctor = GetMethodID(jni(), candidate_class, | 248 jmethodID ctor = GetMethodID( |
249 "<init>", "(Ljava/lang/String;ILjava/lang/String;)V"); | 249 jni(), candidate_class, "<init>", |
| 250 "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V"); |
250 jstring j_mid = JavaStringFromStdString(jni(), candidate->sdp_mid()); | 251 jstring j_mid = JavaStringFromStdString(jni(), candidate->sdp_mid()); |
251 jstring j_sdp = JavaStringFromStdString(jni(), sdp); | 252 jstring j_sdp = JavaStringFromStdString(jni(), sdp); |
252 jobject j_candidate = jni()->NewObject(candidate_class, ctor, j_mid, | 253 jstring j_url = |
253 candidate->sdp_mline_index(), j_sdp); | 254 JavaStringFromStdString(jni(), candidate->candidate().url()); |
| 255 jobject j_candidate = |
| 256 jni()->NewObject(candidate_class, ctor, j_mid, |
| 257 candidate->sdp_mline_index(), j_sdp, j_url); |
254 CHECK_EXCEPTION(jni()) << "error during NewObject"; | 258 CHECK_EXCEPTION(jni()) << "error during NewObject"; |
255 jmethodID m = GetMethodID(jni(), *j_observer_class_, | 259 jmethodID m = GetMethodID(jni(), *j_observer_class_, |
256 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V"); | 260 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V"); |
257 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate); | 261 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate); |
258 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 262 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
259 } | 263 } |
260 | 264 |
261 void OnIceCandidatesRemoved( | 265 void OnIceCandidatesRemoved( |
262 const std::vector<cricket::Candidate>& candidates) override { | 266 const std::vector<cricket::Candidate>& candidates) override { |
263 ScopedLocalRefFrame local_ref_frame(jni()); | 267 ScopedLocalRefFrame local_ref_frame(jni()); |
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) | 2729 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) |
2726 ->inter_tone_gap(); | 2730 ->inter_tone_gap(); |
2727 } | 2731 } |
2728 | 2732 |
2729 JOW(void, DtmfSender_free) | 2733 JOW(void, DtmfSender_free) |
2730 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { | 2734 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { |
2731 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); | 2735 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); |
2732 } | 2736 } |
2733 | 2737 |
2734 } // namespace webrtc_jni | 2738 } // namespace webrtc_jni |
OLD | NEW |