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

Unified Diff: webrtc/video/video_encoder_unittest.cc

Issue 2278883002: Move MutableDataY{,U,V} methods to I420Buffer only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update android capture and decoder code. Created 4 years, 4 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
Index: webrtc/video/video_encoder_unittest.cc
diff --git a/webrtc/video/video_encoder_unittest.cc b/webrtc/video/video_encoder_unittest.cc
index ac006bb872a0515e77b9788c47bebf0292057781..6902850fdd516833363634982e975c31ac17c52b 100644
--- a/webrtc/video/video_encoder_unittest.cc
+++ b/webrtc/video/video_encoder_unittest.cc
@@ -107,18 +107,15 @@ class VideoEncoderSoftwareFallbackWrapperTest : public ::testing::Test {
};
void VideoEncoderSoftwareFallbackWrapperTest::EncodeFrame() {
- frame_.CreateEmptyFrame(kWidth, kHeight, kWidth, (kWidth + 1) / 2,
- (kWidth + 1) / 2);
- memset(frame_.video_frame_buffer()->MutableDataY(), 16,
- frame_.allocated_size(webrtc::kYPlane));
- memset(frame_.video_frame_buffer()->MutableDataU(), 128,
- frame_.allocated_size(webrtc::kUPlane));
- memset(frame_.video_frame_buffer()->MutableDataV(), 128,
- frame_.allocated_size(webrtc::kVPlane));
-
+ rtc::scoped_refptr<I420Buffer> buffer = I420Buffer::Create(
+ kWidth, kHeight, kWidth, (kWidth + 1) / 2, (kWidth + 1) / 2);
+ buffer->SetToBlack();
std::vector<FrameType> types(1, kVideoFrameKey);
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
- fallback_wrapper_.Encode(frame_, nullptr, &types));
+ // VideoFrame frame(buffer, 0, 0, webrtc::kVideoRotation_0);
+ EXPECT_EQ(
+ WEBRTC_VIDEO_CODEC_OK,
+ fallback_wrapper_.Encode(
+ VideoFrame(buffer, 0, 0, webrtc::kVideoRotation_0), nullptr, &types));
}
void VideoEncoderSoftwareFallbackWrapperTest::UtilizeFallbackEncoder() {

Powered by Google App Engine
This is Rietveld 408576698