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

Unified Diff: webrtc/api/video/i420_buffer.h

Issue 2906053002: Update I420Buffer to new VideoFrameBuffer interface (Closed)
Patch Set: Make const versions of Get functions Created 3 years, 7 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 | « no previous file | webrtc/api/video/i420_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/video/i420_buffer.h
diff --git a/webrtc/api/video/i420_buffer.h b/webrtc/api/video/i420_buffer.h
index c849ab22c053dbb63dfa76bb2f3fac1785dba7f7..31014a31f0b3a92301b43e938106368c45dabe49 100644
--- a/webrtc/api/video/i420_buffer.h
+++ b/webrtc/api/video/i420_buffer.h
@@ -30,7 +30,11 @@ class I420Buffer : public I420BufferInterface {
int stride_v);
// Create a new buffer and copy the pixel data.
- static rtc::scoped_refptr<I420Buffer> Copy(const VideoFrameBuffer& buffer);
+ static rtc::scoped_refptr<I420Buffer> Copy(const I420BufferInterface& buffer);
+ // Deprecated.
+ static rtc::scoped_refptr<I420Buffer> Copy(const VideoFrameBuffer& buffer) {
+ return Copy(*buffer.GetI420());
+ }
static rtc::scoped_refptr<I420Buffer> Copy(
int width, int height,
@@ -39,8 +43,13 @@ class I420Buffer : public I420BufferInterface {
const uint8_t* data_v, int stride_v);
// Returns a rotated copy of |src|.
- static rtc::scoped_refptr<I420Buffer> Rotate(const VideoFrameBuffer& src,
+ static rtc::scoped_refptr<I420Buffer> Rotate(const I420BufferInterface& src,
VideoRotation rotation);
+ // Deprecated.
+ static rtc::scoped_refptr<I420Buffer> Rotate(const VideoFrameBuffer& src,
+ VideoRotation rotation) {
+ return Rotate(*src.GetI420(), rotation);
+ }
// Sets the buffer to all black.
static void SetBlack(I420Buffer* buffer);
@@ -69,7 +78,7 @@ class I420Buffer : public I420BufferInterface {
// Scale the cropped area of |src| to the size of |this| buffer, and
// write the result into |this|.
- void CropAndScaleFrom(const VideoFrameBuffer& src,
+ void CropAndScaleFrom(const I420BufferInterface& src,
int offset_x,
int offset_y,
int crop_width,
@@ -77,10 +86,10 @@ class I420Buffer : public I420BufferInterface {
// The common case of a center crop, when needed to adjust the
// aspect ratio without distorting the image.
- void CropAndScaleFrom(const VideoFrameBuffer& src);
+ void CropAndScaleFrom(const I420BufferInterface& src);
// Scale all of |src| to the size of |this| buffer, with no cropping.
- void ScaleFrom(const VideoFrameBuffer& src);
+ void ScaleFrom(const I420BufferInterface& src);
protected:
I420Buffer(int width, int height);
« no previous file with comments | « no previous file | webrtc/api/video/i420_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698