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

Unified Diff: webrtc/common_video/i420_video_frame_unittest.cc

Issue 2528153002: Add I420Buffer::Copy method taking plane pointers as input. (Closed)
Patch Set: Reordered methods. Use RTC_CHECK_EQ. Created 4 years, 1 month 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/common_video/i420_video_frame_unittest.cc
diff --git a/webrtc/common_video/i420_video_frame_unittest.cc b/webrtc/common_video/i420_video_frame_unittest.cc
index 2b000a709c6133befa24c1aa4fbafaccfebb994f..62d14b9f4ac87851e7830a4078ced02febe20fd6 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -151,16 +151,12 @@ TEST(TestVideoFrame, ShallowCopy) {
memset(buffer_y, 16, kSizeY);
memset(buffer_u, 8, kSizeU);
memset(buffer_v, 4, kSizeV);
- // TODO(nisse): This new + Copy looks quite awkward. Consider adding
- // an alternative I420Buffer::Create method.
+
VideoFrame frame1(
- I420Buffer::Copy(*rtc::scoped_refptr<VideoFrameBuffer>(
- new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
- width, height,
- buffer_y, stride_y,
- buffer_u, stride_u,
- buffer_v, stride_v,
- rtc::Callback0<void>([](){})))),
+ I420Buffer::Copy(width, height,
+ buffer_y, stride_y,
+ buffer_u, stride_u,
+ buffer_v, stride_v),
kRotation, 0);
frame1.set_timestamp(timestamp);
frame1.set_ntp_time_ms(ntp_time_ms);
« no previous file with comments | « no previous file | webrtc/common_video/include/video_frame_buffer.h » ('j') | webrtc/common_video/video_frame_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698