Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2692993002: Revert of Add the url attribute to the IceCandidate (Java Wrapper) (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/IceCandidate.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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( 248 jmethodID ctor = GetMethodID(jni(), candidate_class,
249 jni(), candidate_class, "<init>", 249 "<init>", "(Ljava/lang/String;ILjava/lang/String;)V");
250 "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V");
251 jstring j_mid = JavaStringFromStdString(jni(), candidate->sdp_mid()); 250 jstring j_mid = JavaStringFromStdString(jni(), candidate->sdp_mid());
252 jstring j_sdp = JavaStringFromStdString(jni(), sdp); 251 jstring j_sdp = JavaStringFromStdString(jni(), sdp);
253 jstring j_url = 252 jobject j_candidate = jni()->NewObject(candidate_class, ctor, j_mid,
254 JavaStringFromStdString(jni(), candidate->candidate().url()); 253 candidate->sdp_mline_index(), j_sdp);
255 jobject j_candidate =
256 jni()->NewObject(candidate_class, ctor, j_mid,
257 candidate->sdp_mline_index(), j_sdp, j_url);
258 CHECK_EXCEPTION(jni()) << "error during NewObject"; 254 CHECK_EXCEPTION(jni()) << "error during NewObject";
259 jmethodID m = GetMethodID(jni(), *j_observer_class_, 255 jmethodID m = GetMethodID(jni(), *j_observer_class_,
260 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V"); 256 "onIceCandidate", "(Lorg/webrtc/IceCandidate;)V");
261 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate); 257 jni()->CallVoidMethod(*j_observer_global_, m, j_candidate);
262 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; 258 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
263 } 259 }
264 260
265 void OnIceCandidatesRemoved( 261 void OnIceCandidatesRemoved(
266 const std::vector<cricket::Candidate>& candidates) override { 262 const std::vector<cricket::Candidate>& candidates) override {
267 ScopedLocalRefFrame local_ref_frame(jni()); 263 ScopedLocalRefFrame local_ref_frame(jni());
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) 2725 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
2730 ->inter_tone_gap(); 2726 ->inter_tone_gap();
2731 } 2727 }
2732 2728
2733 JOW(void, DtmfSender_free) 2729 JOW(void, DtmfSender_free)
2734 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { 2730 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) {
2735 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); 2731 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release();
2736 } 2732 }
2737 2733
2738 } // namespace webrtc_jni 2734 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/IceCandidate.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698