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

Unified Diff: webrtc/media/base/videocapturer_unittest.cc

Issue 2764133002: Revert of Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Created 3 years, 9 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/media/base/videocapturer.cc ('k') | webrtc/media/base/videosourceinterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videocapturer_unittest.cc
diff --git a/webrtc/media/base/videocapturer_unittest.cc b/webrtc/media/base/videocapturer_unittest.cc
index 2dc5cec70c54e1415a23b85f3c2d30e83b25af69..0e6f992934962c6d981670f41a13d842f884437b 100644
--- a/webrtc/media/base/videocapturer_unittest.cc
+++ b/webrtc/media/base/videocapturer_unittest.cc
@@ -266,7 +266,7 @@
// with less than or equal to |wants.max_pixel_count| depending on how the
// capturer can scale the input frame size.
rtc::VideoSinkWants wants;
- wants.max_pixel_count = 1280 * 720 * 3 / 5;
+ wants.max_pixel_count = rtc::Optional<int>(1280 * 720 * 3 / 5);
capturer_->AddOrUpdateSink(&renderer_, wants);
EXPECT_TRUE(capturer_->CaptureFrame());
EXPECT_EQ(2, renderer_.num_rendered_frames());
@@ -274,7 +274,8 @@
EXPECT_EQ(540, renderer_.height());
// Request a lower resolution.
- wants.max_pixel_count = (renderer_.width() * renderer_.height() * 3) / 5;
+ wants.max_pixel_count =
+ rtc::Optional<int>((renderer_.width() * renderer_.height() * 3) / 5);
capturer_->AddOrUpdateSink(&renderer_, wants);
EXPECT_TRUE(capturer_->CaptureFrame());
EXPECT_EQ(3, renderer_.num_rendered_frames());
@@ -293,8 +294,8 @@
EXPECT_EQ(360, renderer2.height());
// Request higher resolution.
- wants.target_pixel_count.emplace((wants.max_pixel_count * 5) / 3);
- wants.max_pixel_count = wants.max_pixel_count * 4;
+ wants.target_pixel_count.emplace((*wants.max_pixel_count * 5) / 3);
+ wants.max_pixel_count.emplace(*wants.max_pixel_count * 4);
capturer_->AddOrUpdateSink(&renderer_, wants);
EXPECT_TRUE(capturer_->CaptureFrame());
EXPECT_EQ(5, renderer_.num_rendered_frames());
« no previous file with comments | « webrtc/media/base/videocapturer.cc ('k') | webrtc/media/base/videosourceinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698