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

Side by Side Diff: webrtc/media/base/videoframe.cc

Issue 2009193002: Delete IsMutable and IsExclusive methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Delete TestVideoFrame.ReuseAllocation, CreateEmptyFrame no longer does that. 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 dst->video_frame_buffer()->StrideY(), 141 dst->video_frame_buffer()->StrideY(),
142 dst->video_frame_buffer()->StrideU(), 142 dst->video_frame_buffer()->StrideU(),
143 dst->video_frame_buffer()->StrideV(), 143 dst->video_frame_buffer()->StrideV(),
144 dst->width(), dst->height(), 144 dst->width(), dst->height(),
145 interpolate, vert_crop); 145 interpolate, vert_crop);
146 dst->SetTimeStamp(GetTimeStamp()); 146 dst->SetTimeStamp(GetTimeStamp());
147 // Stretched frame should have the same rotation as the source. 147 // Stretched frame should have the same rotation as the source.
148 dst->set_rotation(rotation()); 148 dst->set_rotation(rotation());
149 } 149 }
150 150
151 #if 0
151 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height, 152 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height,
152 bool interpolate, bool vert_crop) const { 153 bool interpolate, bool vert_crop) const {
153 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width), 154 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width),
154 static_cast<int>(dst_height), 155 static_cast<int>(dst_height),
155 GetTimeStamp()); 156 GetTimeStamp());
156 if (dest) { 157 if (dest) {
157 StretchToFrame(dest, interpolate, vert_crop); 158 StretchToFrame(dest, interpolate, vert_crop);
158 } 159 }
159 return dest; 160 return dest;
160 } 161 }
162 #endif
161 163
162 bool VideoFrame::SetToBlack() { 164 bool VideoFrame::SetToBlack() {
163 return libyuv::I420Rect(video_frame_buffer()->MutableDataY(), 165 return libyuv::I420Rect(video_frame_buffer()->MutableDataY(),
164 video_frame_buffer()->StrideY(), 166 video_frame_buffer()->StrideY(),
165 video_frame_buffer()->MutableDataU(), 167 video_frame_buffer()->MutableDataU(),
166 video_frame_buffer()->StrideU(), 168 video_frame_buffer()->StrideU(),
167 video_frame_buffer()->MutableDataV(), 169 video_frame_buffer()->MutableDataV(),
168 video_frame_buffer()->StrideV(), 170 video_frame_buffer()->StrideV(),
169 0, 0, 171 0, 0,
170 width(), height(), 172 width(), height(),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 << " expected: " << expected_size 316 << " expected: " << expected_size
315 << " sample[0..3]: " << static_cast<int>(four_samples[0]) 317 << " sample[0..3]: " << static_cast<int>(four_samples[0])
316 << ", " << static_cast<int>(four_samples[1]) 318 << ", " << static_cast<int>(four_samples[1])
317 << ", " << static_cast<int>(four_samples[2]) 319 << ", " << static_cast<int>(four_samples[2])
318 << ", " << static_cast<int>(four_samples[3]); 320 << ", " << static_cast<int>(four_samples[3]);
319 } 321 }
320 return true; 322 return true;
321 } 323 }
322 324
323 } // namespace cricket 325 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698