| 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 984bd50d674e78d7e7aedfc252fcfef8810b6963..55303ca608c70034c52f493af7c5f6baa87c79b1 100644
|
| --- a/webrtc/common_video/include/video_frame_buffer.h
|
| +++ b/webrtc/common_video/include/video_frame_buffer.h
|
| @@ -109,6 +109,23 @@ class I420Buffer : public VideoFrameBuffer {
|
| static rtc::scoped_refptr<I420Buffer> Copy(
|
| const rtc::scoped_refptr<VideoFrameBuffer>& buffer);
|
|
|
| + // Only the most generally useful operations should be methods on
|
| + // this class, for more specialized operations, use
|
| + // MutableDataY(,U,V) to get write access.
|
| +
|
| + // Crop the input buffer, then scale it to the size of this buffer.
|
| + void CropAndScale(const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
|
| + int offset_x,
|
| + int offset_y,
|
| + int crop_width,
|
| + int crop_height);
|
| +
|
| + // The common case of a center crop, when needed to maintain the
|
| + // same aspect ratio.
|
| + static void CenterCropAndScale(
|
| + const rtc::scoped_refptr<I420Buffer>& dst,
|
| + const rtc::scoped_refptr<VideoFrameBuffer>& src);
|
| +
|
| protected:
|
| ~I420Buffer() override;
|
|
|
|
|