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

Unified Diff: webrtc/video/video_stream_encoder_unittest.cc

Issue 3000693003: Move kMinPixelsPerFrame constant in VideoStreamEncoder to VideoEncoder::ScalingSettings. (Closed)
Patch Set: rebase Created 3 years, 4 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 | « webrtc/video/video_stream_encoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_stream_encoder_unittest.cc
diff --git a/webrtc/video/video_stream_encoder_unittest.cc b/webrtc/video/video_stream_encoder_unittest.cc
index 69b911942ec560f2f9bf0d7e763667c02fa3b76f..9e7fa77b8f24061a4633950d4021c0e46868a94b 100644
--- a/webrtc/video/video_stream_encoder_unittest.cc
+++ b/webrtc/video/video_stream_encoder_unittest.cc
@@ -29,8 +29,6 @@
#include "webrtc/video/video_stream_encoder.h"
namespace {
-// TODO(kthelgason): Lower this limit when better testing
-// on MediaCodec and fallback implementations are in place.
const int kMinPixelsPerFrame = 320 * 180;
const int kMinFramerateFps = 2;
const int64_t kFrameTimeoutMs = 100;
@@ -482,7 +480,7 @@ class VideoStreamEncoderTest : public ::testing::Test {
VideoEncoder::ScalingSettings GetScalingSettings() const override {
rtc::CritScope lock(&local_crit_sect_);
if (quality_scaling_)
- return VideoEncoder::ScalingSettings(true, 1, 2);
+ return VideoEncoder::ScalingSettings(true, 1, 2, kMinPixelsPerFrame);
return VideoEncoder::ScalingSettings(false);
}
@@ -1909,7 +1907,7 @@ TEST_F(VideoStreamEncoderTest, DoesNotScaleBelowSetResolutionLimit) {
video_stream_encoder_->OnBitrateUpdated(kTargetBitrateBps, 0, 0);
// Enable adapter, expected input resolutions when downscaling:
- // 1280x720 -> 960x540 -> 640x360 -> 480x270 -> 320x180 (min resolution limit)
+ // 1280x720 -> 960x540 -> 640x360 -> 480x270 -> 320x180 (kMinPixelsPerFrame)
video_source_.set_adaptation_enabled(true);
EXPECT_FALSE(stats_proxy_->GetStats().bw_limited_resolution);
« no previous file with comments | « webrtc/video/video_stream_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698