Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 1836083003: Add RTCConfiguration getter and setter methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Drop enable/disable from method names. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // We need getter and setter methods for the flags which are used
227 // by applications, chrome in particular.
hbos_google 2016/03/31 08:10:21 super-nit: chrome -> Chrome. Also, this comment ma
228
229 bool dscp() { return enable_dscp.value_or(false); }
230 void set_dscp(bool enable) { enable_dscp = rtc::Optional<bool>(enable); }
231
232 // TODO(nisse): The corresponding flag in MediaConfig and
233 // elsewhere should be renamed enable_cpu_adaptation.
234 bool cpu_adaptation() { return cpu_overuse_detection.value_or(true); }
235 void set_cpu_adaptation(bool enable) {
236 cpu_overuse_detection = rtc::Optional<bool>(enable);
237 }
238
239 // TODO(nisse): Properly no getter method, since it collides with
240 // the flag itself. Add when the flag is moved to MediaConfig.
241 void set_suspend_below_min_bitrate(bool enable) {
242 suspend_below_min_bitrate = rtc::Optional<bool>(enable);
243 }
244
245 // TODO(nisse): The negation in the corresponding MediaConfig
246 // attribute is inconsistent, and it should be renamed at some
247 // point.
248 bool prerenderer_smoothing() { return !disable_prerenderer_smoothing; }
249 void set_prerenderer_smoothing(bool enable) {
250 disable_prerenderer_smoothing = !enable;
251 }
252
226 static const int kUndefined = -1; 253 static const int kUndefined = -1;
227 // Default maximum number of packets in the audio jitter buffer. 254 // Default maximum number of packets in the audio jitter buffer.
228 static const int kAudioJitterBufferMaxPackets = 50; 255 static const int kAudioJitterBufferMaxPackets = 50;
229 // TODO(pthatcher): Rename this ice_transport_type, but update 256 // TODO(pthatcher): Rename this ice_transport_type, but update
230 // Chromium at the same time. 257 // Chromium at the same time.
231 IceTransportsType type; 258 IceTransportsType type;
232 // TODO(pthatcher): Rename this ice_servers, but update Chromium 259 // TODO(pthatcher): Rename this ice_servers, but update Chromium
233 // at the same time. 260 // at the same time.
234 IceServers servers; 261 IceServers servers;
235 BundlePolicy bundle_policy; 262 BundlePolicy bundle_policy;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 CreatePeerConnectionFactory( 684 CreatePeerConnectionFactory(
658 rtc::Thread* worker_thread, 685 rtc::Thread* worker_thread,
659 rtc::Thread* signaling_thread, 686 rtc::Thread* signaling_thread,
660 AudioDeviceModule* default_adm, 687 AudioDeviceModule* default_adm,
661 cricket::WebRtcVideoEncoderFactory* encoder_factory, 688 cricket::WebRtcVideoEncoderFactory* encoder_factory,
662 cricket::WebRtcVideoDecoderFactory* decoder_factory); 689 cricket::WebRtcVideoDecoderFactory* decoder_factory);
663 690
664 } // namespace webrtc 691 } // namespace webrtc
665 692
666 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 693 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698