OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 | 2205 |
2206 port_allocator_->set_flags(portallocator_flags); | 2206 port_allocator_->set_flags(portallocator_flags); |
2207 // No step delay is used while allocating ports. | 2207 // No step delay is used while allocating ports. |
2208 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); | 2208 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); |
2209 port_allocator_->set_candidate_filter( | 2209 port_allocator_->set_candidate_filter( |
2210 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2210 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
2211 | 2211 |
2212 // Call this last since it may create pooled allocator sessions using the | 2212 // Call this last since it may create pooled allocator sessions using the |
2213 // properties set above. | 2213 // properties set above. |
2214 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2214 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
2215 configuration.ice_candidate_pool_size, | 2215 configuration.ice_candidate_pool_size); |
2216 configuration.prune_turn_ports); | |
2217 return true; | 2216 return true; |
2218 } | 2217 } |
2219 | 2218 |
2220 bool PeerConnection::ReconfigurePortAllocator_n( | 2219 bool PeerConnection::ReconfigurePortAllocator_n( |
2221 const RTCConfiguration& configuration) { | 2220 const RTCConfiguration& configuration) { |
2222 cricket::ServerAddresses stun_servers; | 2221 cricket::ServerAddresses stun_servers; |
2223 std::vector<cricket::RelayServerConfig> turn_servers; | 2222 std::vector<cricket::RelayServerConfig> turn_servers; |
2224 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) { | 2223 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) { |
2225 return false; | 2224 return false; |
2226 } | 2225 } |
2227 port_allocator_->set_candidate_filter( | 2226 port_allocator_->set_candidate_filter( |
2228 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2227 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
2229 // Call this last since it may create pooled allocator sessions using the | 2228 // Call this last since it may create pooled allocator sessions using the |
2230 // candidate filter set above. | 2229 // candidate filter set above. |
2231 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2230 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
2232 configuration.ice_candidate_pool_size, | 2231 configuration.ice_candidate_pool_size); |
2233 configuration.prune_turn_ports); | |
2234 return true; | 2232 return true; |
2235 } | 2233 } |
2236 | 2234 |
2237 } // namespace webrtc | 2235 } // namespace webrtc |
OLD | NEW |