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

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: Rename set_cpu_overuse_detection --> set_cpu_adaptation, and add getter. 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.
228
229 // TODO(nisse): Properly named getter methods currently collide
230 // with the attributes they get. Add when attributes are moved
231 // inside MediaConfig.
232 void set_enable_dscp(bool flag) { enable_dscp = rtc::Optional<bool>(flag); }
perkj_webrtc 2016/03/31 07:35:21 set_dscp(bool enable)
233
234 // TODO(nisse): The corresponding flag in MediaConfig and
235 // elsewhere should be renamed enable_cpu_adaptation.
236 bool cpu_adaptation() { return cpu_overuse_detection.value_or(true); }
237 void set_cpu_adaptation(bool enabled) {
238 cpu_overuse_detection = rtc::Optional<bool>(enabled);
239 }
240
241 void set_suspend_below_min_bitrate(bool enabled) {
242 suspend_below_min_bitrate = rtc::Optional<bool>(enabled);
243 }
244
245 // TODO(nisse): This negation in the name (both of this method,
246 // and the corresponding MediaConfig attribute) is inconsistent,
247 // and makes it tempting to add otherwise redundant enable_
248 // prefixes on the other flags. So rename, and for the transition
249 // we can keep this method and let it negate its argument.
250 void set_disable_prerenderer_smoothing(bool disabled) {
perkj_webrtc 2016/03/31 07:35:21 set_prerender_smoo.... (bool enable)
251 disable_prerenderer_smoothing = disabled;
252 }
253
226 static const int kUndefined = -1; 254 static const int kUndefined = -1;
227 // Default maximum number of packets in the audio jitter buffer. 255 // Default maximum number of packets in the audio jitter buffer.
228 static const int kAudioJitterBufferMaxPackets = 50; 256 static const int kAudioJitterBufferMaxPackets = 50;
229 // TODO(pthatcher): Rename this ice_transport_type, but update 257 // TODO(pthatcher): Rename this ice_transport_type, but update
230 // Chromium at the same time. 258 // Chromium at the same time.
231 IceTransportsType type; 259 IceTransportsType type;
232 // TODO(pthatcher): Rename this ice_servers, but update Chromium 260 // TODO(pthatcher): Rename this ice_servers, but update Chromium
233 // at the same time. 261 // at the same time.
234 IceServers servers; 262 IceServers servers;
235 BundlePolicy bundle_policy; 263 BundlePolicy bundle_policy;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 CreatePeerConnectionFactory( 685 CreatePeerConnectionFactory(
658 rtc::Thread* worker_thread, 686 rtc::Thread* worker_thread,
659 rtc::Thread* signaling_thread, 687 rtc::Thread* signaling_thread,
660 AudioDeviceModule* default_adm, 688 AudioDeviceModule* default_adm,
661 cricket::WebRtcVideoEncoderFactory* encoder_factory, 689 cricket::WebRtcVideoEncoderFactory* encoder_factory,
662 cricket::WebRtcVideoDecoderFactory* decoder_factory); 690 cricket::WebRtcVideoDecoderFactory* decoder_factory);
663 691
664 } // namespace webrtc 692 } // namespace webrtc
665 693
666 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 694 #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