Chromium Code Reviews| Index: webrtc/media/engine/webrtcvideoframe.cc |
| diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc |
| index 4f89c8b85d100562d14cb891c6b11e8f67f247d1..cbf21512ab589a83383601fa88118ecc9c6a93e3 100644 |
| --- a/webrtc/media/engine/webrtcvideoframe.cc |
| +++ b/webrtc/media/engine/webrtcvideoframe.cc |
| @@ -149,26 +149,11 @@ bool WebRtcVideoFrame::Reset(uint32_t format, |
| return true; |
| } |
| -VideoFrame* WebRtcVideoFrame::CreateEmptyFrame(int w, |
| - int h, |
| - int64_t timestamp_us) const { |
| - WebRtcVideoFrame* frame = new WebRtcVideoFrame(); |
| - frame->InitToEmptyBuffer(w, h, rtc::kNumNanosecsPerMicrosec * timestamp_us); |
| - return frame; |
| -} |
| - |
| void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h) { |
| video_frame_buffer_ = new rtc::RefCountedObject<webrtc::I420Buffer>(w, h); |
| rotation_ = webrtc::kVideoRotation_0; |
| } |
| -void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h, |
| - int64_t time_stamp_ns) { |
| - video_frame_buffer_ = new rtc::RefCountedObject<webrtc::I420Buffer>(w, h); |
| - SetTimeStamp(time_stamp_ns); |
| - rotation_ = webrtc::kVideoRotation_0; |
| -} |
| - |
| const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const { |
| // If the frame is not rotated, the caller should reuse this frame instead of |
| // making a redundant copy. |
| @@ -196,8 +181,9 @@ const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const { |
| rotated_height = orig_width; |
| } |
| - rotated_frame_.reset( |
| - CreateEmptyFrame(rotated_width, rotated_height, timestamp_us_)); |
| + rotated_frame_.reset(new WebRtcVideoFrame()); |
|
nisse-webrtc
2016/06/20 07:52:23
The plan is to make VideoFrameBuffer always immuta
Sergey Ulanov
2016/06/20 18:42:45
Done.
nisse-webrtc
2016/06/21 07:52:35
It's not quite enough; rotated_frame->video_frame_
Sergey Ulanov
2016/06/21 17:25:55
Done, though it's not really related to this CL, a
|
| + rotated_frame_->InitToEmptyBuffer(rotated_width, rotated_height); |
| + rotated_frame_->set_timestamp_us(timestamp_us_); |
| // TODO(guoweis): Add a function in webrtc_libyuv.cc to convert from |
| // VideoRotation to libyuv::RotationMode. |