From de2049e85aec04043ee7b85d79f716b67ed9a5af Mon Sep 17 00:00:00 2001 From: Evan Shrubsole Date: Mon, 25 May 2020 16:54:21 +0200 Subject: [PATCH] Unflake VideoStreamEncoderTest.StatsTracksCpuAdaptationStatsWhenSwitchingSource_Balanced MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=hbos@webrtc.org Bug: webrtc:11603 Change-Id: I6644f96cf1ec22ceb268349f0f325d73082a0148 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175917 Reviewed-by: Henrik Boström Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Evan Shrubsole Cr-Commit-Position: refs/heads/master@{#31350} --- video/video_stream_encoder_unittest.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/video/video_stream_encoder_unittest.cc b/video/video_stream_encoder_unittest.cc index 4ff7ddcc8f..277c00b701 100644 --- a/video/video_stream_encoder_unittest.cc +++ b/video/video_stream_encoder_unittest.cc @@ -2461,7 +2461,7 @@ TEST_F(VideoStreamEncoderTest, // Set new degradation preference should clear restrictions since we changed // from BALANCED. - video_stream_encoder_->SetSource( + video_stream_encoder_->SetSourceAndWaitForRestrictionsUpdated( &source, webrtc::DegradationPreference::MAINTAIN_FRAMERATE); source.IncomingCapturedFrame(CreateFrame(sequence, kWidth, kHeight)); WaitForEncodedFrame(sequence++); @@ -2485,8 +2485,8 @@ TEST_F(VideoStreamEncoderTest, EXPECT_EQ(2, stats.number_of_cpu_adapt_changes); // Back to BALANCED, should clear the restrictions again. - video_stream_encoder_->SetSource(&source, - webrtc::DegradationPreference::BALANCED); + video_stream_encoder_->SetSourceAndWaitForRestrictionsUpdated( + &source, webrtc::DegradationPreference::BALANCED); source.IncomingCapturedFrame(CreateFrame(sequence, kWidth, kHeight)); WaitForEncodedFrame(sequence++); stats = stats_proxy_->GetStats();