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

Side by Side Diff: webrtc/common_video/video_frame.cc

Issue 2065733003: Delete unused and almost unused frame-related methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Eliminate call to set_video_frame_buffer. 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 bool VideoFrame::IsZeroSize() const { 149 bool VideoFrame::IsZeroSize() const {
150 return !video_frame_buffer_; 150 return !video_frame_buffer_;
151 } 151 }
152 152
153 const rtc::scoped_refptr<VideoFrameBuffer>& VideoFrame::video_frame_buffer() 153 const rtc::scoped_refptr<VideoFrameBuffer>& VideoFrame::video_frame_buffer()
154 const { 154 const {
155 return video_frame_buffer_; 155 return video_frame_buffer_;
156 } 156 }
157 157
158 void VideoFrame::set_video_frame_buffer(
159 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer) {
160 RTC_DCHECK(buffer);
161 video_frame_buffer_ = buffer;
162 }
163
164 VideoFrame VideoFrame::ConvertNativeToI420Frame() const {
165 RTC_DCHECK(video_frame_buffer_->native_handle());
166 VideoFrame frame;
167 frame.ShallowCopy(*this);
168 frame.set_video_frame_buffer(video_frame_buffer_->NativeToI420Buffer());
169 return frame;
170 }
171
172 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) { 158 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) {
173 switch (codec_type) { 159 switch (codec_type) {
174 case kVideoCodecVP8: 160 case kVideoCodecVP8:
175 case kVideoCodecVP9: 161 case kVideoCodecVP9:
176 return 0; 162 return 0;
177 case kVideoCodecH264: 163 case kVideoCodecH264:
178 return kBufferPaddingBytesH264; 164 return kBufferPaddingBytesH264;
179 case kVideoCodecI420: 165 case kVideoCodecI420:
180 case kVideoCodecRED: 166 case kVideoCodecRED:
181 case kVideoCodecULPFEC: 167 case kVideoCodecULPFEC:
182 case kVideoCodecGeneric: 168 case kVideoCodecGeneric:
183 case kVideoCodecUnknown: 169 case kVideoCodecUnknown:
184 return 0; 170 return 0;
185 } 171 }
186 RTC_NOTREACHED(); 172 RTC_NOTREACHED();
187 return 0; 173 return 0;
188 } 174 }
189 175
190 } // namespace webrtc 176 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_video/include/video_frame_buffer.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698