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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 kTcpCandidatePolicyDisabled | 216 kTcpCandidatePolicyDisabled |
217 }; | 217 }; |
218 | 218 |
219 enum ContinualGatheringPolicy { | 219 enum ContinualGatheringPolicy { |
220 GATHER_ONCE, | 220 GATHER_ONCE, |
221 GATHER_CONTINUALLY | 221 GATHER_CONTINUALLY |
222 }; | 222 }; |
223 | 223 |
224 // TODO(hbos): Change into class with private data and public getters. | 224 // TODO(hbos): Change into class with private data and public getters. |
225 struct RTCConfiguration { | 225 struct RTCConfiguration { |
| 226 // This struct is subject to reorganization, both for naming |
| 227 // consistency, and to group settings to match where they are used |
| 228 // in the implementation. To do that, we need getter and setter |
| 229 // methods for all settings which are of interest to applications, |
| 230 // Chrome in particular. |
| 231 |
| 232 bool dscp() { return enable_dscp.value_or(false); } |
| 233 void set_dscp(bool enable) { enable_dscp = rtc::Optional<bool>(enable); } |
| 234 |
| 235 // TODO(nisse): The corresponding flag in MediaConfig and |
| 236 // elsewhere should be renamed enable_cpu_adaptation. |
| 237 bool cpu_adaptation() { return cpu_overuse_detection.value_or(true); } |
| 238 void set_cpu_adaptation(bool enable) { |
| 239 cpu_overuse_detection = rtc::Optional<bool>(enable); |
| 240 } |
| 241 |
| 242 // TODO(nisse): Currently no getter method, since it collides with |
| 243 // the flag itself. Add when the flag is moved to MediaConfig. |
| 244 void set_suspend_below_min_bitrate(bool enable) { |
| 245 suspend_below_min_bitrate = rtc::Optional<bool>(enable); |
| 246 } |
| 247 |
| 248 // TODO(nisse): The negation in the corresponding MediaConfig |
| 249 // attribute is inconsistent, and it should be renamed at some |
| 250 // point. |
| 251 bool prerenderer_smoothing() { return !disable_prerenderer_smoothing; } |
| 252 void set_prerenderer_smoothing(bool enable) { |
| 253 disable_prerenderer_smoothing = !enable; |
| 254 } |
| 255 |
226 static const int kUndefined = -1; | 256 static const int kUndefined = -1; |
227 // Default maximum number of packets in the audio jitter buffer. | 257 // Default maximum number of packets in the audio jitter buffer. |
228 static const int kAudioJitterBufferMaxPackets = 50; | 258 static const int kAudioJitterBufferMaxPackets = 50; |
229 // TODO(pthatcher): Rename this ice_transport_type, but update | 259 // TODO(pthatcher): Rename this ice_transport_type, but update |
230 // Chromium at the same time. | 260 // Chromium at the same time. |
231 IceTransportsType type; | 261 IceTransportsType type; |
232 // TODO(pthatcher): Rename this ice_servers, but update Chromium | 262 // TODO(pthatcher): Rename this ice_servers, but update Chromium |
233 // at the same time. | 263 // at the same time. |
234 IceServers servers; | 264 IceServers servers; |
235 BundlePolicy bundle_policy; | 265 BundlePolicy bundle_policy; |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 CreatePeerConnectionFactory( | 687 CreatePeerConnectionFactory( |
658 rtc::Thread* worker_thread, | 688 rtc::Thread* worker_thread, |
659 rtc::Thread* signaling_thread, | 689 rtc::Thread* signaling_thread, |
660 AudioDeviceModule* default_adm, | 690 AudioDeviceModule* default_adm, |
661 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 691 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
662 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 692 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
663 | 693 |
664 } // namespace webrtc | 694 } // namespace webrtc |
665 | 695 |
666 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 696 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |