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

Side by Side Diff: webrtc/api/android/jni/peerconnection_jni.cc

Issue 2297663004: Use AggressiveConfiguration as the default configuration in IOS (Closed)
Patch Set: Fix a comment Created 4 years, 3 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 | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | 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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 jni, j_rtc_config, j_presume_writable_when_fully_relayed_id); 1636 jni, j_rtc_config, j_presume_writable_when_fully_relayed_id);
1637 } 1637 }
1638 1638
1639 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( 1639 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
1640 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config, 1640 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config,
1641 jobject j_constraints, jlong observer_p) { 1641 jobject j_constraints, jlong observer_p) {
1642 rtc::scoped_refptr<PeerConnectionFactoryInterface> f( 1642 rtc::scoped_refptr<PeerConnectionFactoryInterface> f(
1643 reinterpret_cast<PeerConnectionFactoryInterface*>( 1643 reinterpret_cast<PeerConnectionFactoryInterface*>(
1644 factoryFromJava(factory))); 1644 factoryFromJava(factory)));
1645 1645
1646 PeerConnectionInterface::RTCConfiguration rtc_config = 1646 PeerConnectionInterface::RTCConfiguration rtc_config(
1647 PeerConnectionInterface::RTCConfiguration::AggressiveConfiguration(); 1647 PeerConnectionInterface::RTCConfigurationType::kAggressive);
1648 JavaRTCConfigurationToJsepRTCConfiguration(jni, j_rtc_config, &rtc_config); 1648 JavaRTCConfigurationToJsepRTCConfiguration(jni, j_rtc_config, &rtc_config);
1649 1649
1650 jclass j_rtc_config_class = GetObjectClass(jni, j_rtc_config); 1650 jclass j_rtc_config_class = GetObjectClass(jni, j_rtc_config);
1651 jfieldID j_key_type_id = GetFieldID(jni, j_rtc_config_class, "keyType", 1651 jfieldID j_key_type_id = GetFieldID(jni, j_rtc_config_class, "keyType",
1652 "Lorg/webrtc/PeerConnection$KeyType;"); 1652 "Lorg/webrtc/PeerConnection$KeyType;");
1653 jobject j_key_type = GetObjectField(jni, j_rtc_config, j_key_type_id); 1653 jobject j_key_type = GetObjectField(jni, j_rtc_config, j_key_type_id);
1654 1654
1655 // Generate non-default certificate. 1655 // Generate non-default certificate.
1656 rtc::KeyType key_type = JavaKeyTypeToNativeType(jni, j_key_type); 1656 rtc::KeyType key_type = JavaKeyTypeToNativeType(jni, j_key_type);
1657 if (key_type != rtc::KT_DEFAULT) { 1657 if (key_type != rtc::KT_DEFAULT) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 jobject j_observer, jobject j_sdp) { 1778 jobject j_observer, jobject j_sdp) {
1779 rtc::scoped_refptr<SetSdpObserverWrapper> observer( 1779 rtc::scoped_refptr<SetSdpObserverWrapper> observer(
1780 new rtc::RefCountedObject<SetSdpObserverWrapper>( 1780 new rtc::RefCountedObject<SetSdpObserverWrapper>(
1781 jni, j_observer, reinterpret_cast<ConstraintsWrapper*>(NULL))); 1781 jni, j_observer, reinterpret_cast<ConstraintsWrapper*>(NULL)));
1782 ExtractNativePC(jni, j_pc)->SetRemoteDescription( 1782 ExtractNativePC(jni, j_pc)->SetRemoteDescription(
1783 observer, JavaSdpToNativeSdp(jni, j_sdp)); 1783 observer, JavaSdpToNativeSdp(jni, j_sdp));
1784 } 1784 }
1785 1785
1786 JOW(jboolean, PeerConnection_setConfiguration)( 1786 JOW(jboolean, PeerConnection_setConfiguration)(
1787 JNIEnv* jni, jobject j_pc, jobject j_rtc_config) { 1787 JNIEnv* jni, jobject j_pc, jobject j_rtc_config) {
1788 PeerConnectionInterface::RTCConfiguration rtc_config = 1788 PeerConnectionInterface::RTCConfiguration rtc_config(
1789 PeerConnectionInterface::RTCConfiguration::AggressiveConfiguration(); 1789 PeerConnectionInterface::RTCConfigurationType::kAggressive);
1790 JavaRTCConfigurationToJsepRTCConfiguration(jni, j_rtc_config, &rtc_config); 1790 JavaRTCConfigurationToJsepRTCConfiguration(jni, j_rtc_config, &rtc_config);
1791 return ExtractNativePC(jni, j_pc)->SetConfiguration(rtc_config); 1791 return ExtractNativePC(jni, j_pc)->SetConfiguration(rtc_config);
1792 } 1792 }
1793 1793
1794 JOW(jboolean, PeerConnection_nativeAddIceCandidate)( 1794 JOW(jboolean, PeerConnection_nativeAddIceCandidate)(
1795 JNIEnv* jni, jobject j_pc, jstring j_sdp_mid, 1795 JNIEnv* jni, jobject j_pc, jstring j_sdp_mid,
1796 jint j_sdp_mline_index, jstring j_candidate_sdp) { 1796 jint j_sdp_mline_index, jstring j_candidate_sdp) {
1797 std::string sdp_mid = JavaToStdString(jni, j_sdp_mid); 1797 std::string sdp_mid = JavaToStdString(jni, j_sdp_mid);
1798 std::string sdp = JavaToStdString(jni, j_candidate_sdp); 1798 std::string sdp = JavaToStdString(jni, j_candidate_sdp);
1799 std::unique_ptr<IceCandidateInterface> candidate( 1799 std::unique_ptr<IceCandidateInterface> candidate(
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 return JavaStringFromStdString( 2326 return JavaStringFromStdString(
2327 jni, 2327 jni,
2328 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); 2328 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id());
2329 } 2329 }
2330 2330
2331 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { 2331 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) {
2332 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); 2332 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release();
2333 } 2333 }
2334 2334
2335 } // namespace webrtc_jni 2335 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698