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

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 redundant RefCountedObject wrapping. 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
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/base/videoframefactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height,
152 bool interpolate, bool vert_crop) const {
153 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width),
154 static_cast<int>(dst_height),
155 GetTimeStamp());
156 if (dest) {
157 StretchToFrame(dest, interpolate, vert_crop);
158 }
159 return dest;
160 }
161
162 bool VideoFrame::SetToBlack() { 151 bool VideoFrame::SetToBlack() {
163 return libyuv::I420Rect(video_frame_buffer()->MutableDataY(), 152 return libyuv::I420Rect(video_frame_buffer()->MutableDataY(),
164 video_frame_buffer()->StrideY(), 153 video_frame_buffer()->StrideY(),
165 video_frame_buffer()->MutableDataU(), 154 video_frame_buffer()->MutableDataU(),
166 video_frame_buffer()->StrideU(), 155 video_frame_buffer()->StrideU(),
167 video_frame_buffer()->MutableDataV(), 156 video_frame_buffer()->MutableDataV(),
168 video_frame_buffer()->StrideV(), 157 video_frame_buffer()->StrideV(),
169 0, 0, 158 0, 0,
170 width(), height(), 159 width(), height(),
171 16, 128, 128) == 0; 160 16, 128, 128) == 0;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 << " expected: " << expected_size 303 << " expected: " << expected_size
315 << " sample[0..3]: " << static_cast<int>(four_samples[0]) 304 << " sample[0..3]: " << static_cast<int>(four_samples[0])
316 << ", " << static_cast<int>(four_samples[1]) 305 << ", " << static_cast<int>(four_samples[1])
317 << ", " << static_cast<int>(four_samples[2]) 306 << ", " << static_cast<int>(four_samples[2])
318 << ", " << static_cast<int>(four_samples[3]); 307 << ", " << static_cast<int>(four_samples[3]);
319 } 308 }
320 return true; 309 return true;
321 } 310 }
322 311
323 } // namespace cricket 312 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/base/videoframefactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698