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

Unified Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2528153002: Add I420Buffer::Copy method taking plane pointers as input. (Closed)
Patch Set: 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/include/video_frame_buffer.h
diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h
index 287624e59ec5076f72ad0d87a856a6fe8e0ba8b0..98abdd0724985e97ade6b424842ddc254d8e7c8f 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -57,10 +57,11 @@ class VideoFrameBuffer : public rtc::RefCountInterface {
// Plain I420 buffer in standard memory.
class I420Buffer : public VideoFrameBuffer {
- public:
+ protected:
I420Buffer(int width, int height);
I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v);
+ public:
magjed_webrtc 2016/11/28 08:39:56 The order must be public, protected, private.
nisse-webrtc 2016/11/28 09:44:53 Done.
static rtc::scoped_refptr<I420Buffer> Create(int width, int height);
static rtc::scoped_refptr<I420Buffer> Create(int width,
int height,
@@ -98,6 +99,12 @@ class I420Buffer : public VideoFrameBuffer {
// Create a new buffer and copy the pixel data.
static rtc::scoped_refptr<I420Buffer> Copy(const VideoFrameBuffer& buffer);
magjed_webrtc 2016/11/28 08:39:56 Can you move both these static methods up to the o
nisse-webrtc 2016/11/28 09:44:54 Done, except for the deprecated version of the Cop
magjed_webrtc 2016/11/28 10:18:20 Yeah, it's probably best to reorder the .cc file t
+ static rtc::scoped_refptr<I420Buffer> Copy(
+ int width, int height,
+ const uint8_t* data_y, int stride_y,
+ const uint8_t* data_u, int stride_u,
+ const uint8_t* data_v, int stride_v);
+
// Scale the cropped area of |src| to the size of |this| buffer, and
// write the result into |this|.
void CropAndScaleFrom(const VideoFrameBuffer& src,

Powered by Google App Engine
This is Rietveld 408576698