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

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

Issue 2541863002: Delete VideoFrame default constructor, and IsZeroSize method. (Closed)
Patch Set: Initialize pixel data in VideoBroadcasterTest.OnFrame test. Created 4 years 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/common_video/video_frame.cc ('k') | webrtc/media/engine/fakewebrtccall.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videobroadcaster_unittest.cc
diff --git a/webrtc/media/base/videobroadcaster_unittest.cc b/webrtc/media/base/videobroadcaster_unittest.cc
index 6a8c618bb6a78d1a5059d57b0bbd2c55225342f3..c80f0853af336c38851d57da40ec9f47a759af2a 100644
--- a/webrtc/media/base/videobroadcaster_unittest.cc
+++ b/webrtc/media/base/videobroadcaster_unittest.cc
@@ -37,8 +37,15 @@ TEST(VideoBroadcasterTest, OnFrame) {
FakeVideoRenderer sink2;
broadcaster.AddOrUpdateSink(&sink1, rtc::VideoSinkWants());
broadcaster.AddOrUpdateSink(&sink2, rtc::VideoSinkWants());
+ static int kWidth = 100;
+ static int kHeight = 50;
- webrtc::VideoFrame frame;
+ rtc::scoped_refptr<webrtc::I420Buffer> buffer(
+ webrtc::I420Buffer::Create(kWidth, kHeight));
+ // Initialize, to avoid warnings on use of initialized values.
+ buffer->SetToBlack();
+
+ webrtc::VideoFrame frame(buffer, webrtc::kVideoRotation_0, 0);
broadcaster.OnFrame(frame);
EXPECT_EQ(1, sink1.num_rendered_frames());
« no previous file with comments | « webrtc/common_video/video_frame.cc ('k') | webrtc/media/engine/fakewebrtccall.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698