Chromium Code Reviews| Index: webrtc/media/base/videoframe.h |
| diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h |
| index bac609eb157362f852e1b0b6528d454472ca76b6..aeda5efa0509a2b46b5c16bccda5db18682a776a 100644 |
| --- a/webrtc/media/base/videoframe.h |
| +++ b/webrtc/media/base/videoframe.h |
| @@ -77,9 +77,6 @@ class VideoFrame { |
| virtual void SetTimeStamp(int64_t time_stamp) = 0; |
| // Indicates the rotation angle in degrees. |
| - // TODO(guoweis): Remove this function, rename GetVideoRotation and remove the |
| - // skeleton implementation of GetRotation once chrome is updated. |
| - virtual int GetRotation() const { return GetVideoRotation(); } |
| virtual webrtc::VideoRotation GetVideoRotation() const { |
|
pbos-webrtc
2016/02/10 15:15:32
Can this be pure virtual now?
nisse-webrtc
2016/02/10 15:28:06
At least the compiler doesn't complain. And WebRtc
|
| return webrtc::kVideoRotation_0; |
| } |
| @@ -99,23 +96,6 @@ class VideoFrame { |
| // buffer if it is currently shared by other objects. |
| virtual bool MakeExclusive() = 0; |
| - // Writes the frame into the given frame buffer, provided that it is of |
| - // sufficient size. Returns the frame's actual size, regardless of whether |
| - // it was written or not (like snprintf). If there is insufficient space, |
| - // nothing is written. |
| - virtual size_t CopyToBuffer(uint8_t* buffer, size_t size) const; |
| - |
| - // Writes the frame into the given planes, stretched to the given width and |
| - // height. The parameter "interpolate" controls whether to interpolate or just |
| - // take the nearest-point. The parameter "crop" controls whether to crop this |
| - // frame to the aspect ratio of the given dimensions before stretching. |
| - virtual bool CopyToPlanes(uint8_t* dst_y, |
| - uint8_t* dst_u, |
| - uint8_t* dst_v, |
| - int32_t dst_pitch_y, |
| - int32_t dst_pitch_u, |
| - int32_t dst_pitch_v) const; |
| - |
| // Writes the frame into the target VideoFrame. |
| virtual void CopyToFrame(VideoFrame* target) const; |
| @@ -123,13 +103,6 @@ class VideoFrame { |
| // ownership of the returned frame is held by this frame. |
| virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; |
| - // Writes the frame into the given stream and returns the StreamResult. |
| - // See webrtc/base/stream.h for a description of StreamResult and error. |
| - // Error may be NULL. If a non-success value is returned from |
| - // StreamInterface::Write(), we immediately return with that value. |
| - virtual rtc::StreamResult Write(rtc::StreamInterface* stream, |
| - int* error) const; |
| - |
| // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. |
| // Returns the frame's actual size, regardless of whether it was written or |
| // not (like snprintf). Parameters size and stride_rgb are in units of bytes. |
| @@ -178,12 +151,18 @@ class VideoFrame { |
| const uint8_t* sample, |
| size_t sample_size); |
| - // Size of an I420 image of given dimensions when stored as a frame buffer. |
| - static size_t SizeOf(size_t w, size_t h) { |
| - return w * h + ((w + 1) / 2) * ((h + 1) / 2) * 2; |
| - } |
| - |
| protected: |
| + // Writes the frame into the given planes, stretched to the given width and |
| + // height. The parameter "interpolate" controls whether to interpolate or just |
| + // take the nearest-point. The parameter "crop" controls whether to crop this |
| + // frame to the aspect ratio of the given dimensions before stretching. |
| + virtual bool CopyToPlanes(uint8_t* dst_y, |
| + uint8_t* dst_u, |
| + uint8_t* dst_v, |
| + int32_t dst_pitch_y, |
| + int32_t dst_pitch_u, |
| + int32_t dst_pitch_v) const; |
| + |
| // Creates an empty frame. |
| virtual VideoFrame *CreateEmptyFrame(int w, int h, |
| int64_t time_stamp) const = 0; |