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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 struct RTCConfiguration { | 245 struct RTCConfiguration { |
246 // This struct is subject to reorganization, both for naming | 246 // This struct is subject to reorganization, both for naming |
247 // consistency, and to group settings to match where they are used | 247 // consistency, and to group settings to match where they are used |
248 // in the implementation. To do that, we need getter and setter | 248 // in the implementation. To do that, we need getter and setter |
249 // methods for all settings which are of interest to applications, | 249 // methods for all settings which are of interest to applications, |
250 // Chrome in particular. | 250 // Chrome in particular. |
251 | 251 |
252 RTCConfiguration() = default; | 252 RTCConfiguration() = default; |
253 RTCConfiguration(RTCConfigurationType type) { | 253 RTCConfiguration(RTCConfigurationType type) { |
254 if (type == RTCConfigurationType::kAggressive) { | 254 if (type == RTCConfigurationType::kAggressive) { |
| 255 // These parameters are also defined in Java and IOS configurations, |
| 256 // so their values may be overwritten by the Java or IOS configuration. |
| 257 bundle_policy = kBundlePolicyMaxBundle; |
| 258 rtcp_mux_policy = kRtcpMuxPolicyRequire; |
| 259 ice_connection_receiving_timeout = |
| 260 kAggressiveIceConnectionReceivingTimeout; |
| 261 |
| 262 // These parameters are not defined in Java or IOS configuration, |
| 263 // so their values will not be overwritten. |
| 264 enable_ice_renomination = true; |
255 redetermine_role_on_ice_restart = false; | 265 redetermine_role_on_ice_restart = false; |
256 } | 266 } |
257 } | 267 } |
258 | 268 |
259 bool dscp() { return media_config.enable_dscp; } | 269 bool dscp() { return media_config.enable_dscp; } |
260 void set_dscp(bool enable) { media_config.enable_dscp = enable; } | 270 void set_dscp(bool enable) { media_config.enable_dscp = enable; } |
261 | 271 |
262 // TODO(nisse): The corresponding flag in MediaConfig and | 272 // TODO(nisse): The corresponding flag in MediaConfig and |
263 // elsewhere should be renamed enable_cpu_adaptation. | 273 // elsewhere should be renamed enable_cpu_adaptation. |
264 bool cpu_adaptation() { | 274 bool cpu_adaptation() { |
(...skipping 16 matching lines...) Expand all Loading... |
281 bool prerenderer_smoothing() { | 291 bool prerenderer_smoothing() { |
282 return !media_config.video.disable_prerenderer_smoothing; | 292 return !media_config.video.disable_prerenderer_smoothing; |
283 } | 293 } |
284 void set_prerenderer_smoothing(bool enable) { | 294 void set_prerenderer_smoothing(bool enable) { |
285 media_config.video.disable_prerenderer_smoothing = !enable; | 295 media_config.video.disable_prerenderer_smoothing = !enable; |
286 } | 296 } |
287 | 297 |
288 static const int kUndefined = -1; | 298 static const int kUndefined = -1; |
289 // Default maximum number of packets in the audio jitter buffer. | 299 // Default maximum number of packets in the audio jitter buffer. |
290 static const int kAudioJitterBufferMaxPackets = 50; | 300 static const int kAudioJitterBufferMaxPackets = 50; |
| 301 // ICE connection receiving timeout for aggressive configuration. |
| 302 static const int kAggressiveIceConnectionReceivingTimeout = 1000; |
291 // TODO(pthatcher): Rename this ice_transport_type, but update | 303 // TODO(pthatcher): Rename this ice_transport_type, but update |
292 // Chromium at the same time. | 304 // Chromium at the same time. |
293 IceTransportsType type = kAll; | 305 IceTransportsType type = kAll; |
294 // TODO(pthatcher): Rename this ice_servers, but update Chromium | 306 // TODO(pthatcher): Rename this ice_servers, but update Chromium |
295 // at the same time. | 307 // at the same time. |
296 IceServers servers; | 308 IceServers servers; |
297 BundlePolicy bundle_policy = kBundlePolicyBalanced; | 309 BundlePolicy bundle_policy = kBundlePolicyBalanced; |
298 RtcpMuxPolicy rtcp_mux_policy = kRtcpMuxPolicyNegotiate; | 310 RtcpMuxPolicy rtcp_mux_policy = kRtcpMuxPolicyNegotiate; |
299 TcpCandidatePolicy tcp_candidate_policy = kTcpCandidatePolicyEnabled; | 311 TcpCandidatePolicy tcp_candidate_policy = kTcpCandidatePolicyEnabled; |
300 CandidateNetworkPolicy candidate_network_policy = | 312 CandidateNetworkPolicy candidate_network_policy = |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 768 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
757 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 769 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
758 return CreatePeerConnectionFactory( | 770 return CreatePeerConnectionFactory( |
759 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 771 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
760 default_adm, encoder_factory, decoder_factory); | 772 default_adm, encoder_factory, decoder_factory); |
761 } | 773 } |
762 | 774 |
763 } // namespace webrtc | 775 } // namespace webrtc |
764 | 776 |
765 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 777 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |