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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 // methods for all settings which are of interest to applications, | 240 // methods for all settings which are of interest to applications, |
241 // Chrome in particular. | 241 // Chrome in particular. |
242 | 242 |
243 // A configuration that is safer to use, despite it may not have the best | 243 // A configuration that is safer to use, despite it may not have the best |
244 // performance. | 244 // performance. |
245 static RTCConfiguration SafeConfiguration() { return RTCConfiguration(); } | 245 static RTCConfiguration SafeConfiguration() { return RTCConfiguration(); } |
246 | 246 |
247 // An aggressive configuration that has better performance, although it | 247 // An aggressive configuration that has better performance, although it |
248 // may be riskier and may need extra support in the application. | 248 // may be riskier and may need extra support in the application. |
249 static RTCConfiguration AggressiveConfiguration() { | 249 static RTCConfiguration AggressiveConfiguration() { |
250 RTCConfiguration config; | 250 return RTCConfiguration(true); |
251 config.redetermine_role_on_ice_restart = false; | 251 } |
252 return config; | 252 |
253 RTCConfiguration() = default; | |
254 RTCConfiguration(bool aggressive) { | |
255 if (aggressive) { | |
256 redetermine_role_on_ice_restart = false; | |
257 } | |
pthatcher1
2016/09/01 07:05:44
I can understand why you would want to have a cons
honghaiz3
2016/09/01 16:07:50
Done.
| |
253 } | 258 } |
254 | 259 |
255 bool dscp() { return media_config.enable_dscp; } | 260 bool dscp() { return media_config.enable_dscp; } |
256 void set_dscp(bool enable) { media_config.enable_dscp = enable; } | 261 void set_dscp(bool enable) { media_config.enable_dscp = enable; } |
257 | 262 |
258 // TODO(nisse): The corresponding flag in MediaConfig and | 263 // TODO(nisse): The corresponding flag in MediaConfig and |
259 // elsewhere should be renamed enable_cpu_adaptation. | 264 // elsewhere should be renamed enable_cpu_adaptation. |
260 bool cpu_adaptation() { | 265 bool cpu_adaptation() { |
261 return media_config.video.enable_cpu_overuse_detection; | 266 return media_config.video.enable_cpu_overuse_detection; |
262 } | 267 } |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
752 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 757 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
753 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 758 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
754 return CreatePeerConnectionFactory( | 759 return CreatePeerConnectionFactory( |
755 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 760 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
756 default_adm, encoder_factory, decoder_factory); | 761 default_adm, encoder_factory, decoder_factory); |
757 } | 762 } |
758 | 763 |
759 } // namespace webrtc | 764 } // namespace webrtc |
760 | 765 |
761 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 766 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |