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 |
11 #import "RTCConfiguration.h" | 11 #import "RTCConfiguration.h" |
12 | 12 |
| 13 #include <memory> |
| 14 |
13 #include "webrtc/base/sslidentity.h" | 15 #include "webrtc/base/sslidentity.h" |
14 | 16 |
15 #import "webrtc/api/objc/RTCConfiguration+Private.h" | 17 #import "webrtc/api/objc/RTCConfiguration+Private.h" |
16 #import "webrtc/api/objc/RTCIceServer+Private.h" | 18 #import "webrtc/api/objc/RTCIceServer+Private.h" |
17 #import "webrtc/base/objc/RTCLogging.h" | 19 #import "webrtc/base/objc/RTCLogging.h" |
18 | 20 |
19 @implementation RTCConfiguration | 21 @implementation RTCConfiguration |
20 | 22 |
21 @synthesize iceServers = _iceServers; | 23 @synthesize iceServers = _iceServers; |
22 @synthesize iceTransportPolicy = _iceTransportPolicy; | 24 @synthesize iceTransportPolicy = _iceTransportPolicy; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 nativeConfig.rtcp_mux_policy = | 81 nativeConfig.rtcp_mux_policy = |
80 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; | 82 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; |
81 nativeConfig.tcp_candidate_policy = | 83 nativeConfig.tcp_candidate_policy = |
82 [[self class] nativeTcpCandidatePolicyForPolicy:_tcpCandidatePolicy]; | 84 [[self class] nativeTcpCandidatePolicyForPolicy:_tcpCandidatePolicy]; |
83 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; | 85 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; |
84 nativeConfig.ice_connection_receiving_timeout = | 86 nativeConfig.ice_connection_receiving_timeout = |
85 _iceConnectionReceivingTimeout; | 87 _iceConnectionReceivingTimeout; |
86 nativeConfig.ice_backup_candidate_pair_ping_interval = | 88 nativeConfig.ice_backup_candidate_pair_ping_interval = |
87 _iceBackupCandidatePairPingInterval; | 89 _iceBackupCandidatePairPingInterval; |
88 if (_keyType == RTCEncryptionKeyTypeECDSA) { | 90 if (_keyType == RTCEncryptionKeyTypeECDSA) { |
89 rtc::scoped_ptr<rtc::SSLIdentity> identity( | 91 std::unique_ptr<rtc::SSLIdentity> identity( |
90 rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA)); | 92 rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA)); |
91 if (identity) { | 93 if (identity) { |
92 nativeConfig.certificates.push_back( | 94 nativeConfig.certificates.push_back( |
93 rtc::RTCCertificate::Create(std::move(identity))); | 95 rtc::RTCCertificate::Create(std::move(identity))); |
94 } else { | 96 } else { |
95 RTCLogWarning(@"Failed to generate ECDSA identity. RSA will be used."); | 97 RTCLogWarning(@"Failed to generate ECDSA identity. RSA will be used."); |
96 } | 98 } |
97 } | 99 } |
98 | 100 |
99 return nativeConfig; | 101 return nativeConfig; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 + (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy { | 229 + (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy { |
228 switch (policy) { | 230 switch (policy) { |
229 case RTCTcpCandidatePolicyEnabled: | 231 case RTCTcpCandidatePolicyEnabled: |
230 return @"TCP_ENABLED"; | 232 return @"TCP_ENABLED"; |
231 case RTCTcpCandidatePolicyDisabled: | 233 case RTCTcpCandidatePolicyDisabled: |
232 return @"TCP_DISABLED"; | 234 return @"TCP_DISABLED"; |
233 } | 235 } |
234 } | 236 } |
235 | 237 |
236 @end | 238 @end |
OLD | NEW |