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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm

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 | « webrtc/api/peerconnectioninterface.h ('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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 23 matching lines...) Expand all
34 @synthesize keyType = _keyType; 34 @synthesize keyType = _keyType;
35 @synthesize iceCandidatePoolSize = _iceCandidatePoolSize; 35 @synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
36 @synthesize shouldPruneTurnPorts = _shouldPruneTurnPorts; 36 @synthesize shouldPruneTurnPorts = _shouldPruneTurnPorts;
37 @synthesize shouldPresumeWritableWhenFullyRelayed = 37 @synthesize shouldPresumeWritableWhenFullyRelayed =
38 _shouldPresumeWritableWhenFullyRelayed; 38 _shouldPresumeWritableWhenFullyRelayed;
39 39
40 - (instancetype)init { 40 - (instancetype)init {
41 if (self = [super init]) { 41 if (self = [super init]) {
42 _iceServers = [NSMutableArray array]; 42 _iceServers = [NSMutableArray array];
43 // Copy defaults. 43 // Copy defaults.
44 webrtc::PeerConnectionInterface::RTCConfiguration config; 44 webrtc::PeerConnectionInterface::RTCConfiguration config(
45 webrtc::PeerConnectionInterface::RTCConfigurationType::kAggressive);
45 _iceTransportPolicy = 46 _iceTransportPolicy =
46 [[self class] transportPolicyForTransportsType:config.type]; 47 [[self class] transportPolicyForTransportsType:config.type];
47 _bundlePolicy = 48 _bundlePolicy =
48 [[self class] bundlePolicyForNativePolicy:config.bundle_policy]; 49 [[self class] bundlePolicyForNativePolicy:config.bundle_policy];
49 _rtcpMuxPolicy = 50 _rtcpMuxPolicy =
50 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; 51 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy];
51 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: 52 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy:
52 config.tcp_candidate_policy]; 53 config.tcp_candidate_policy];
53 _candidateNetworkPolicy = [[self class] 54 _candidateNetworkPolicy = [[self class]
54 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy]; 55 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy];
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 _iceCandidatePoolSize, 87 _iceCandidatePoolSize,
87 _shouldPruneTurnPorts, 88 _shouldPruneTurnPorts,
88 _shouldPresumeWritableWhenFullyRelayed]; 89 _shouldPresumeWritableWhenFullyRelayed];
89 } 90 }
90 91
91 #pragma mark - Private 92 #pragma mark - Private
92 93
93 - (webrtc::PeerConnectionInterface::RTCConfiguration *) 94 - (webrtc::PeerConnectionInterface::RTCConfiguration *)
94 createNativeConfiguration { 95 createNativeConfiguration {
95 std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> 96 std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
96 nativeConfig(new webrtc::PeerConnectionInterface::RTCConfiguration()); 97 nativeConfig(new webrtc::PeerConnectionInterface::RTCConfiguration(
98 webrtc::PeerConnectionInterface::RTCConfigurationType::kAggressive));
97 99
98 for (RTCIceServer *iceServer in _iceServers) { 100 for (RTCIceServer *iceServer in _iceServers) {
99 nativeConfig->servers.push_back(iceServer.nativeServer); 101 nativeConfig->servers.push_back(iceServer.nativeServer);
100 } 102 }
101 nativeConfig->type = 103 nativeConfig->type =
102 [[self class] nativeTransportsTypeForTransportPolicy:_iceTransportPolicy]; 104 [[self class] nativeTransportsTypeForTransportPolicy:_iceTransportPolicy];
103 nativeConfig->bundle_policy = 105 nativeConfig->bundle_policy =
104 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy]; 106 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy];
105 nativeConfig->rtcp_mux_policy = 107 nativeConfig->rtcp_mux_policy =
106 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; 108 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy];
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 (RTCEncryptionKeyType)keyType { 337 (RTCEncryptionKeyType)keyType {
336 switch (keyType) { 338 switch (keyType) {
337 case RTCEncryptionKeyTypeRSA: 339 case RTCEncryptionKeyTypeRSA:
338 return rtc::KT_RSA; 340 return rtc::KT_RSA;
339 case RTCEncryptionKeyTypeECDSA: 341 case RTCEncryptionKeyTypeECDSA:
340 return rtc::KT_ECDSA; 342 return rtc::KT_ECDSA;
341 } 343 }
342 } 344 }
343 345
344 @end 346 @end
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698