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

Unified Diff: webrtc/media/base/videoframe_unittest.h

Issue 1831523004: Move InitToBlack and Reset methods from cricket::VideoFrame to its subclass cricket::WebRtcVideoFra… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 8 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/videoframe.h ('k') | webrtc/media/engine/webrtcvideoframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videoframe_unittest.h
diff --git a/webrtc/media/base/videoframe_unittest.h b/webrtc/media/base/videoframe_unittest.h
index b01f0b856c6e3ea8d93b11e58e64fa831a9e4879..9e9b7dddb1f6e6967a0f3275804659932dcd6933 100644
--- a/webrtc/media/base/videoframe_unittest.h
+++ b/webrtc/media/base/videoframe_unittest.h
@@ -1371,48 +1371,6 @@ class VideoFrameTest : public testing::Test {
}
}
- // Tests re-initing an existing image.
- void Reset(webrtc::VideoRotation rotation, bool apply_rotation) {
- T frame1, frame2;
- std::unique_ptr<rtc::MemoryStream> ms(
- LoadSample(kImageFilename));
- ASSERT_TRUE(ms.get() != NULL);
- size_t data_size;
- ms->GetSize(&data_size);
- EXPECT_TRUE(frame1.InitToBlack(kWidth, kHeight, 0));
- EXPECT_TRUE(frame2.InitToBlack(kWidth, kHeight, 0));
- EXPECT_TRUE(IsBlack(frame1));
- EXPECT_TRUE(IsEqual(frame1, frame2, 0));
- EXPECT_TRUE(frame1.Reset(cricket::FOURCC_I420, kWidth, kHeight, kWidth,
- kHeight,
- reinterpret_cast<uint8_t*>(ms->GetBuffer()),
- data_size, 0, rotation, apply_rotation));
- if (apply_rotation)
- EXPECT_EQ(webrtc::kVideoRotation_0, frame1.GetVideoRotation());
- else
- EXPECT_EQ(rotation, frame1.GetVideoRotation());
-
- // Swapp width and height if the frame is rotated 90 or 270 degrees.
- if (apply_rotation && (rotation == webrtc::kVideoRotation_90
- || rotation == webrtc::kVideoRotation_270)) {
- EXPECT_TRUE(kHeight == frame1.width());
- EXPECT_TRUE(kWidth == frame1.height());
- } else {
- EXPECT_TRUE(kWidth == frame1.width());
- EXPECT_TRUE(kHeight == frame1.height());
- }
- EXPECT_FALSE(IsBlack(frame1));
- EXPECT_FALSE(IsEqual(frame1, frame2, 0));
- }
-
- void ResetAndApplyRotation() {
- Reset(webrtc::kVideoRotation_90, true);
- }
-
- void ResetAndDontApplyRotation() {
- Reset(webrtc::kVideoRotation_90, false);
- }
-
//////////////////////
// Conversion tests //
//////////////////////
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/engine/webrtcvideoframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698