Disable automatic scaling in tests.

BUG=webrtc:6990

Review-Url: https://codereview.webrtc.org/2636903004
Cr-Commit-Position: refs/heads/master@{#16119}
This commit is contained in:
nisse 2017-01-17 05:45:40 -08:00 committed by Commit bot
parent 311a64ccf5
commit 2013e29df1

View File

@ -82,7 +82,13 @@ class VideoMediaChannelTest : public testing::Test,
virtual void SetUp() { virtual void SetUp() {
engine_.Init(); engine_.Init();
channel_.reset(engine_.CreateChannel(call_.get(), cricket::MediaConfig(), cricket::MediaConfig media_config;
// Disabling cpu overuse detection actually disables quality scaling too; it
// implies DegradationPreference kMaintainResolution. Automatic scaling
// needs to be disabled, otherwise, tests which check the size of received
// frames become flaky.
media_config.video.enable_cpu_overuse_detection = false;
channel_.reset(engine_.CreateChannel(call_.get(), media_config,
cricket::VideoOptions())); cricket::VideoOptions()));
channel_->OnReadyToSend(true); channel_->OnReadyToSend(true);
EXPECT_TRUE(channel_.get() != NULL); EXPECT_TRUE(channel_.get() != NULL);