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

Side by Side Diff: webrtc/media/engine/webrtcvideoframe.cc

Issue 2080253002: Delete method cricket::VideoFrame::Copy. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix syntax error in objc files. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 int WebRtcVideoFrame::height() const { 72 int WebRtcVideoFrame::height() const {
73 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; 73 return video_frame_buffer_ ? video_frame_buffer_->height() : 0;
74 } 74 }
75 75
76 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& 76 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>&
77 WebRtcVideoFrame::video_frame_buffer() const { 77 WebRtcVideoFrame::video_frame_buffer() const {
78 return video_frame_buffer_; 78 return video_frame_buffer_;
79 } 79 }
80 80
81 VideoFrame* WebRtcVideoFrame::Copy() const {
82 return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_);
83 }
84
85 size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc, 81 size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc,
86 uint8_t* buffer, 82 uint8_t* buffer,
87 size_t size, 83 size_t size,
88 int stride_rgb) const { 84 int stride_rgb) const {
89 RTC_CHECK(video_frame_buffer_); 85 RTC_CHECK(video_frame_buffer_);
90 RTC_CHECK(video_frame_buffer_->native_handle() == nullptr); 86 RTC_CHECK(video_frame_buffer_->native_handle() == nullptr);
91 return VideoFrame::ConvertToRgbBuffer(to_fourcc, buffer, size, stride_rgb); 87 return VideoFrame::ConvertToRgbBuffer(to_fourcc, buffer, size, stride_rgb);
92 } 88 }
93 89
94 bool WebRtcVideoFrame::Reset(uint32_t format, 90 bool WebRtcVideoFrame::Reset(uint32_t format,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 rotated_frame_->video_frame_buffer()->StrideV(), 209 rotated_frame_->video_frame_buffer()->StrideV(),
214 orig_width, orig_height, 210 orig_width, orig_height,
215 static_cast<libyuv::RotationMode>(rotation())); 211 static_cast<libyuv::RotationMode>(rotation()));
216 if (ret == 0) { 212 if (ret == 0) {
217 return rotated_frame_.get(); 213 return rotated_frame_.get();
218 } 214 }
219 return nullptr; 215 return nullptr;
220 } 216 }
221 217
222 } // namespace cricket 218 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698