OLD | NEW |
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 Loading... |
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(true); |
45 _iceTransportPolicy = | 45 _iceTransportPolicy = |
46 [[self class] transportPolicyForTransportsType:config.type]; | 46 [[self class] transportPolicyForTransportsType:config.type]; |
47 _bundlePolicy = | 47 _bundlePolicy = |
48 [[self class] bundlePolicyForNativePolicy:config.bundle_policy]; | 48 [[self class] bundlePolicyForNativePolicy:config.bundle_policy]; |
49 _rtcpMuxPolicy = | 49 _rtcpMuxPolicy = |
50 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; | 50 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; |
51 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: | 51 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: |
52 config.tcp_candidate_policy]; | 52 config.tcp_candidate_policy]; |
53 _candidateNetworkPolicy = [[self class] | 53 _candidateNetworkPolicy = [[self class] |
54 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy]; | 54 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy]; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 _iceCandidatePoolSize, | 86 _iceCandidatePoolSize, |
87 _shouldPruneTurnPorts, | 87 _shouldPruneTurnPorts, |
88 _shouldPresumeWritableWhenFullyRelayed]; | 88 _shouldPresumeWritableWhenFullyRelayed]; |
89 } | 89 } |
90 | 90 |
91 #pragma mark - Private | 91 #pragma mark - Private |
92 | 92 |
93 - (webrtc::PeerConnectionInterface::RTCConfiguration *) | 93 - (webrtc::PeerConnectionInterface::RTCConfiguration *) |
94 createNativeConfiguration { | 94 createNativeConfiguration { |
95 std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> | 95 std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> |
96 nativeConfig(new webrtc::PeerConnectionInterface::RTCConfiguration()); | 96 nativeConfig(new webrtc::PeerConnectionInterface::RTCConfiguration(true)); |
97 | 97 |
98 for (RTCIceServer *iceServer in _iceServers) { | 98 for (RTCIceServer *iceServer in _iceServers) { |
99 nativeConfig->servers.push_back(iceServer.nativeServer); | 99 nativeConfig->servers.push_back(iceServer.nativeServer); |
100 } | 100 } |
101 nativeConfig->type = | 101 nativeConfig->type = |
102 [[self class] nativeTransportsTypeForTransportPolicy:_iceTransportPolicy]; | 102 [[self class] nativeTransportsTypeForTransportPolicy:_iceTransportPolicy]; |
103 nativeConfig->bundle_policy = | 103 nativeConfig->bundle_policy = |
104 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy]; | 104 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy]; |
105 nativeConfig->rtcp_mux_policy = | 105 nativeConfig->rtcp_mux_policy = |
106 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; | 106 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 (RTCEncryptionKeyType)keyType { | 335 (RTCEncryptionKeyType)keyType { |
336 switch (keyType) { | 336 switch (keyType) { |
337 case RTCEncryptionKeyTypeRSA: | 337 case RTCEncryptionKeyTypeRSA: |
338 return rtc::KT_RSA; | 338 return rtc::KT_RSA; |
339 case RTCEncryptionKeyTypeECDSA: | 339 case RTCEncryptionKeyTypeECDSA: |
340 return rtc::KT_ECDSA; | 340 return rtc::KT_ECDSA; |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
344 @end | 344 @end |
OLD | NEW |