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

Unified Diff: webrtc/call/call_perf_tests.cc

Issue 2672793002: Change rtc::VideoSinkWants to have target and a max pixel count (Closed)
Patch Set: Fixed incorrect behavior in VideoAdapter, updated test Created 3 years, 10 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 | « no previous file | webrtc/media/base/adaptedvideotracksource.cc » ('j') | webrtc/video/vie_encoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call_perf_tests.cc
diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc
index b6a8fe6047070f50d4f0ba2b4e887f5251c93024..949c080a369ec27755403077c54d601eec6ef2be 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -490,13 +490,20 @@ TEST_F(CallPerfTest, ReceivesCpuOveruseAndUnderuse) {
const rtc::VideoSinkWants& wants) override {
// First expect CPU overuse. Then expect CPU underuse when the encoder
// delay has been decreased.
- if (wants.max_pixel_count) {
+ if (wants.target_pixel_count &&
+ *wants.target_pixel_count <
+ wants.max_pixel_count.value_or(std::numeric_limits<int>::max())) {
+ // On adapting up, ViEEncoder::VideoSourceProxy will set the target
+ // pixel count to a step up from the current and the max value to
+ // something higher than the target.
+ EXPECT_FALSE(expect_lower_resolution_wants_);
+ observation_complete_.Set();
+ } else if (wants.max_pixel_count) {
+ // On adapting down, ViEEncoder::VideoSourceProxy will set only the max
+ // pixel count, leaving the target unset.
EXPECT_TRUE(expect_lower_resolution_wants_);
expect_lower_resolution_wants_ = false;
encoder_.SetDelay(2);
- } else if (wants.max_pixel_count_step_up) {
- EXPECT_FALSE(expect_lower_resolution_wants_);
- observation_complete_.Set();
}
}
« no previous file with comments | « no previous file | webrtc/media/base/adaptedvideotracksource.cc » ('j') | webrtc/video/vie_encoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698