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

Unified Diff: webrtc/video/overuse_frame_detector_unittest.cc

Issue 2378003002: Delete webrtc::VideoFrame::CreateEmptyFrame. (Closed)
Patch Set: Added size_t/int cast, needed for windows 64-bit builds. Created 4 years, 3 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/test/frame_generator.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/overuse_frame_detector_unittest.cc
diff --git a/webrtc/video/overuse_frame_detector_unittest.cc b/webrtc/video/overuse_frame_detector_unittest.cc
index 7f69ac00c98b1cc312c1c5c0d93288f6ed16bab2..f05bad57c07d764273424ed3680d3fb04e9d085d 100644
--- a/webrtc/video/overuse_frame_detector_unittest.cc
+++ b/webrtc/video/overuse_frame_detector_unittest.cc
@@ -101,8 +101,8 @@ class OveruseFrameDetectorTest : public ::testing::Test,
int width,
int height,
int delay_ms) {
- VideoFrame frame;
- frame.CreateEmptyFrame(width, height, width, width / 2, width / 2);
+ VideoFrame frame(I420Buffer::Create(width, height),
+ webrtc::kVideoRotation_0, 0);
uint32_t timestamp = 0;
while (num_frames-- > 0) {
frame.set_timestamp(timestamp);
@@ -283,8 +283,8 @@ TEST_F(OveruseFrameDetectorTest, MeasuresMultipleConcurrentSamples) {
EXPECT_CALL(*(observer_.get()), OveruseDetected()).Times(testing::AtLeast(1));
static const int kIntervalMs = 33;
static const size_t kNumFramesEncodingDelay = 3;
- VideoFrame frame;
- frame.CreateEmptyFrame(kWidth, kHeight, kWidth, kWidth / 2, kWidth / 2);
+ VideoFrame frame(I420Buffer::Create(kWidth, kHeight),
+ webrtc::kVideoRotation_0, 0);
for (size_t i = 0; i < 1000; ++i) {
// Unique timestamps.
frame.set_timestamp(static_cast<uint32_t>(i));
@@ -304,8 +304,8 @@ TEST_F(OveruseFrameDetectorTest, UpdatesExistingSamples) {
EXPECT_CALL(*(observer_.get()), OveruseDetected()).Times(testing::AtLeast(1));
static const int kIntervalMs = 33;
static const int kDelayMs = 30;
- VideoFrame frame;
- frame.CreateEmptyFrame(kWidth, kHeight, kWidth, kWidth / 2, kWidth / 2);
+ VideoFrame frame(I420Buffer::Create(kWidth, kHeight),
+ webrtc::kVideoRotation_0, 0);
uint32_t timestamp = 0;
for (size_t i = 0; i < 1000; ++i) {
frame.set_timestamp(timestamp);
« no previous file with comments | « webrtc/test/frame_generator.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698