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 10 matching lines...) Expand all Loading... |
21 @implementation RTCConfiguration | 21 @implementation RTCConfiguration |
22 | 22 |
23 @synthesize iceServers = _iceServers; | 23 @synthesize iceServers = _iceServers; |
24 @synthesize iceTransportPolicy = _iceTransportPolicy; | 24 @synthesize iceTransportPolicy = _iceTransportPolicy; |
25 @synthesize bundlePolicy = _bundlePolicy; | 25 @synthesize bundlePolicy = _bundlePolicy; |
26 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; | 26 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; |
27 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; | 27 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; |
28 @synthesize candidateNetworkPolicy = _candidateNetworkPolicy; | 28 @synthesize candidateNetworkPolicy = _candidateNetworkPolicy; |
29 @synthesize continualGatheringPolicy = _continualGatheringPolicy; | 29 @synthesize continualGatheringPolicy = _continualGatheringPolicy; |
30 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; | 30 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; |
| 31 @synthesize audioJitterBufferFastAccelerate = _audioJitterBufferFastAccelerate; |
31 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; | 32 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; |
32 @synthesize iceBackupCandidatePairPingInterval = | 33 @synthesize iceBackupCandidatePairPingInterval = |
33 _iceBackupCandidatePairPingInterval; | 34 _iceBackupCandidatePairPingInterval; |
34 @synthesize keyType = _keyType; | 35 @synthesize keyType = _keyType; |
35 @synthesize iceCandidatePoolSize = _iceCandidatePoolSize; | 36 @synthesize iceCandidatePoolSize = _iceCandidatePoolSize; |
36 @synthesize shouldPruneTurnPorts = _shouldPruneTurnPorts; | 37 @synthesize shouldPruneTurnPorts = _shouldPruneTurnPorts; |
37 @synthesize shouldPresumeWritableWhenFullyRelayed = | 38 @synthesize shouldPresumeWritableWhenFullyRelayed = |
38 _shouldPresumeWritableWhenFullyRelayed; | 39 _shouldPresumeWritableWhenFullyRelayed; |
39 | 40 |
40 - (instancetype)init { | 41 - (instancetype)init { |
(...skipping 10 matching lines...) Expand all Loading... |
51 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; | 52 [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; |
52 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: | 53 _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: |
53 config.tcp_candidate_policy]; | 54 config.tcp_candidate_policy]; |
54 _candidateNetworkPolicy = [[self class] | 55 _candidateNetworkPolicy = [[self class] |
55 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy]; | 56 candidateNetworkPolicyForNativePolicy:config.candidate_network_policy]; |
56 webrtc::PeerConnectionInterface::ContinualGatheringPolicy nativePolicy = | 57 webrtc::PeerConnectionInterface::ContinualGatheringPolicy nativePolicy = |
57 config.continual_gathering_policy; | 58 config.continual_gathering_policy; |
58 _continualGatheringPolicy = | 59 _continualGatheringPolicy = |
59 [[self class] continualGatheringPolicyForNativePolicy:nativePolicy]; | 60 [[self class] continualGatheringPolicyForNativePolicy:nativePolicy]; |
60 _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets; | 61 _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets; |
| 62 _audioJitterBufferFastAccelerate = config.audio_jitter_buffer_fast_accelerat
e; |
61 _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout; | 63 _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout; |
62 _iceBackupCandidatePairPingInterval = | 64 _iceBackupCandidatePairPingInterval = |
63 config.ice_backup_candidate_pair_ping_interval; | 65 config.ice_backup_candidate_pair_ping_interval; |
64 _keyType = RTCEncryptionKeyTypeECDSA; | 66 _keyType = RTCEncryptionKeyTypeECDSA; |
65 _iceCandidatePoolSize = config.ice_candidate_pool_size; | 67 _iceCandidatePoolSize = config.ice_candidate_pool_size; |
66 _shouldPruneTurnPorts = config.prune_turn_ports; | 68 _shouldPruneTurnPorts = config.prune_turn_ports; |
67 _shouldPresumeWritableWhenFullyRelayed = | 69 _shouldPresumeWritableWhenFullyRelayed = |
68 config.presume_writable_when_fully_relayed; | 70 config.presume_writable_when_fully_relayed; |
69 } | 71 } |
70 return self; | 72 return self; |
71 } | 73 } |
72 | 74 |
73 - (NSString *)description { | 75 - (NSString *)description { |
74 return [NSString stringWithFormat: | 76 return [NSString stringWithFormat: |
75 @"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\
n}\n", | 77 @"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\
n%d\n}\n", |
76 _iceServers, | 78 _iceServers, |
77 [[self class] stringForTransportPolicy:_iceTransportPolicy], | 79 [[self class] stringForTransportPolicy:_iceTransportPolicy], |
78 [[self class] stringForBundlePolicy:_bundlePolicy], | 80 [[self class] stringForBundlePolicy:_bundlePolicy], |
79 [[self class] stringForRtcpMuxPolicy:_rtcpMuxPolicy], | 81 [[self class] stringForRtcpMuxPolicy:_rtcpMuxPolicy], |
80 [[self class] stringForTcpCandidatePolicy:_tcpCandidatePolicy], | 82 [[self class] stringForTcpCandidatePolicy:_tcpCandidatePolicy], |
81 [[self class] stringForCandidateNetworkPolicy:_candidateNetworkPolicy], | 83 [[self class] stringForCandidateNetworkPolicy:_candidateNetworkPolicy], |
82 [[self class] | 84 [[self class] |
83 stringForContinualGatheringPolicy:_continualGatheringPolicy], | 85 stringForContinualGatheringPolicy:_continualGatheringPolicy], |
84 _audioJitterBufferMaxPackets, | 86 _audioJitterBufferMaxPackets, |
| 87 _audioJitterBufferFastAccelerate, |
85 _iceConnectionReceivingTimeout, | 88 _iceConnectionReceivingTimeout, |
86 _iceBackupCandidatePairPingInterval, | 89 _iceBackupCandidatePairPingInterval, |
87 _iceCandidatePoolSize, | 90 _iceCandidatePoolSize, |
88 _shouldPruneTurnPorts, | 91 _shouldPruneTurnPorts, |
89 _shouldPresumeWritableWhenFullyRelayed]; | 92 _shouldPresumeWritableWhenFullyRelayed]; |
90 } | 93 } |
91 | 94 |
92 #pragma mark - Private | 95 #pragma mark - Private |
93 | 96 |
94 - (webrtc::PeerConnectionInterface::RTCConfiguration *) | 97 - (webrtc::PeerConnectionInterface::RTCConfiguration *) |
(...skipping 11 matching lines...) Expand all Loading... |
106 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy]; | 109 [[self class] nativeBundlePolicyForPolicy:_bundlePolicy]; |
107 nativeConfig->rtcp_mux_policy = | 110 nativeConfig->rtcp_mux_policy = |
108 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; | 111 [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; |
109 nativeConfig->tcp_candidate_policy = | 112 nativeConfig->tcp_candidate_policy = |
110 [[self class] nativeTcpCandidatePolicyForPolicy:_tcpCandidatePolicy]; | 113 [[self class] nativeTcpCandidatePolicyForPolicy:_tcpCandidatePolicy]; |
111 nativeConfig->candidate_network_policy = [[self class] | 114 nativeConfig->candidate_network_policy = [[self class] |
112 nativeCandidateNetworkPolicyForPolicy:_candidateNetworkPolicy]; | 115 nativeCandidateNetworkPolicyForPolicy:_candidateNetworkPolicy]; |
113 nativeConfig->continual_gathering_policy = [[self class] | 116 nativeConfig->continual_gathering_policy = [[self class] |
114 nativeContinualGatheringPolicyForPolicy:_continualGatheringPolicy]; | 117 nativeContinualGatheringPolicyForPolicy:_continualGatheringPolicy]; |
115 nativeConfig->audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; | 118 nativeConfig->audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; |
| 119 nativeConfig->audio_jitter_buffer_fast_accelerate = |
| 120 _audioJitterBufferFastAccelerate ? true : false; |
116 nativeConfig->ice_connection_receiving_timeout = | 121 nativeConfig->ice_connection_receiving_timeout = |
117 _iceConnectionReceivingTimeout; | 122 _iceConnectionReceivingTimeout; |
118 nativeConfig->ice_backup_candidate_pair_ping_interval = | 123 nativeConfig->ice_backup_candidate_pair_ping_interval = |
119 _iceBackupCandidatePairPingInterval; | 124 _iceBackupCandidatePairPingInterval; |
120 rtc::KeyType keyType = | 125 rtc::KeyType keyType = |
121 [[self class] nativeEncryptionKeyTypeForKeyType:_keyType]; | 126 [[self class] nativeEncryptionKeyTypeForKeyType:_keyType]; |
122 // Generate non-default certificate. | 127 // Generate non-default certificate. |
123 if (keyType != rtc::KT_DEFAULT) { | 128 if (keyType != rtc::KT_DEFAULT) { |
124 rtc::scoped_refptr<rtc::RTCCertificate> certificate = | 129 rtc::scoped_refptr<rtc::RTCCertificate> certificate = |
125 rtc::RTCCertificateGenerator::GenerateCertificate( | 130 rtc::RTCCertificateGenerator::GenerateCertificate( |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 (RTCEncryptionKeyType)keyType { | 342 (RTCEncryptionKeyType)keyType { |
338 switch (keyType) { | 343 switch (keyType) { |
339 case RTCEncryptionKeyTypeRSA: | 344 case RTCEncryptionKeyTypeRSA: |
340 return rtc::KT_RSA; | 345 return rtc::KT_RSA; |
341 case RTCEncryptionKeyTypeECDSA: | 346 case RTCEncryptionKeyTypeECDSA: |
342 return rtc::KT_ECDSA; | 347 return rtc::KT_ECDSA; |
343 } | 348 } |
344 } | 349 } |
345 | 350 |
346 @end | 351 @end |
OLD | NEW |