From e0727118f1f208ab1b92bee657e9a3f965e7c2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85sa=20Persson?= Date: Mon, 3 Apr 2023 11:37:02 +0200 Subject: [PATCH] QualityScalingTest.AdaptsDownAndThenUpWithBalanced: fix for flaky test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:14922 Change-Id: Ide460e78f00fcf59c8a5da66b431592f10512d94 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299461 Commit-Queue: Åsa Persson Reviewed-by: Erik Språng Cr-Commit-Position: refs/heads/main@{#39745} --- video/quality_scaling_tests.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/video/quality_scaling_tests.cc b/video/quality_scaling_tests.cc index 7eaf14831b..80b66166c4 100644 --- a/video/quality_scaling_tests.cc +++ b/video/quality_scaling_tests.cc @@ -155,6 +155,15 @@ class ScalingObserver : public test::SendTest { test_params_.size()); } + Action OnSendRtp(const uint8_t* packet, size_t length) override { + // The tests are expected to send at the configured start bitrate. Do not + // send any packets to avoid receiving REMB and possibly go down in target + // bitrate. A low bitrate estimate could result in downgrading due to other + // reasons than low/high QP-value (e.g. high frame drop percent) or not + // upgrading due to bitrate constraint. + return DROP_PACKET; + } + void PerformTest() override { EXPECT_EQ(expect_scaling_, Wait()); } test::FunctionVideoEncoderFactory encoder_factory_;