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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 08a131920e3be649746ebbc083cdf8b4f64d7a69..25c1cf67d6f45500b1856bb4d272f5b6212e4278 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -223,6 +223,34 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
// TODO(hbos): Change into class with private data and public getters.
struct RTCConfiguration {
+ // We need getter and setter methods for the flags which are used
+ // by applications, chrome in particular.
+
+ // TODO(nisse): Properly named getter methods currently collide
+ // with the attributes they get. Add when attributes are moved
+ // inside MediaConfig.
+ void set_enable_dscp(bool flag) { enable_dscp = rtc::Optional<bool>(flag); }
perkj_webrtc 2016/03/31 07:35:21 set_dscp(bool enable)
+
+ // TODO(nisse): The corresponding flag in MediaConfig and
+ // elsewhere should be renamed enable_cpu_adaptation.
+ bool cpu_adaptation() { return cpu_overuse_detection.value_or(true); }
+ void set_cpu_adaptation(bool enabled) {
+ cpu_overuse_detection = rtc::Optional<bool>(enabled);
+ }
+
+ void set_suspend_below_min_bitrate(bool enabled) {
+ suspend_below_min_bitrate = rtc::Optional<bool>(enabled);
+ }
+
+ // TODO(nisse): This negation in the name (both of this method,
+ // and the corresponding MediaConfig attribute) is inconsistent,
+ // and makes it tempting to add otherwise redundant enable_
+ // prefixes on the other flags. So rename, and for the transition
+ // we can keep this method and let it negate its argument.
+ void set_disable_prerenderer_smoothing(bool disabled) {
perkj_webrtc 2016/03/31 07:35:21 set_prerender_smoo.... (bool enable)
+ disable_prerenderer_smoothing = disabled;
+ }
+
static const int kUndefined = -1;
// Default maximum number of packets in the audio jitter buffer.
static const int kAudioJitterBufferMaxPackets = 50;
« 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