Enable CPU adaptation by default.
WebRtcVideoEngine2 doesn't support CPU-monitor-based adaptation and as
such requires encoder-time-based CPU adaptation to perform any
adaptation at all.
BUG=4536
R=asapersson@webrtc.org, mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49679004
Cr-Commit-Position: refs/heads/master@{#9001}
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index 953257f..b2e0941 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -641,7 +641,7 @@
}
void WebRtcVideoChannel2::SetDefaultOptions() {
- options_.cpu_overuse_detection.Set(false);
+ options_.cpu_overuse_detection.Set(true);
options_.dscp.Set(false);
options_.suspend_below_min_bitrate.Set(false);
options_.video_noise_reduction.Set(true);
diff --git a/talk/media/webrtc/webrtcvideoengine2_unittest.cc b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
index aabefd6..7add66c 100644
--- a/talk/media/webrtc/webrtcvideoengine2_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
@@ -1732,9 +1732,9 @@
codecs.push_back(codec);
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
- if (enable_overuse) {
+ if (!enable_overuse) {
VideoOptions options;
- options.cpu_overuse_detection.Set(true);
+ options.cpu_overuse_detection.Set(false);
channel_->SetOptions(options);
}