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

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

Issue 1324263004: Remove cricket::VideoFrame::Set/GetElapsedTime() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased. Re-added CapturedFrame.elapsed_time. Remove once Chromium is updated. Created 5 years, 2 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 | « talk/media/base/videoframe.h ('k') | talk/media/base/videoframe_unittest.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 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 bool interpolate, bool vert_crop) const { 194 bool interpolate, bool vert_crop) const {
195 if (!dst) { 195 if (!dst) {
196 LOG(LS_ERROR) << "NULL dst pointer."; 196 LOG(LS_ERROR) << "NULL dst pointer.";
197 return; 197 return;
198 } 198 }
199 199
200 StretchToPlanes(dst->GetYPlane(), dst->GetUPlane(), dst->GetVPlane(), 200 StretchToPlanes(dst->GetYPlane(), dst->GetUPlane(), dst->GetVPlane(),
201 dst->GetYPitch(), dst->GetUPitch(), dst->GetVPitch(), 201 dst->GetYPitch(), dst->GetUPitch(), dst->GetVPitch(),
202 dst->GetWidth(), dst->GetHeight(), 202 dst->GetWidth(), dst->GetHeight(),
203 interpolate, vert_crop); 203 interpolate, vert_crop);
204 dst->SetElapsedTime(GetElapsedTime());
205 dst->SetTimeStamp(GetTimeStamp()); 204 dst->SetTimeStamp(GetTimeStamp());
206 // Stretched frame should have the same rotation as the source. 205 // Stretched frame should have the same rotation as the source.
207 dst->SetRotation(GetVideoRotation()); 206 dst->SetRotation(GetVideoRotation());
208 } 207 }
209 208
210 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height, 209 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height,
211 bool interpolate, bool vert_crop) const { 210 bool interpolate, bool vert_crop) const {
212 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width), 211 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width),
213 static_cast<int>(dst_height), 212 static_cast<int>(dst_height),
214 GetPixelWidth(), GetPixelHeight(), 213 GetPixelWidth(), GetPixelHeight(),
215 GetElapsedTime(), GetTimeStamp()); 214 GetTimeStamp());
216 if (dest) { 215 if (dest) {
217 StretchToFrame(dest, interpolate, vert_crop); 216 StretchToFrame(dest, interpolate, vert_crop);
218 } 217 }
219 return dest; 218 return dest;
220 } 219 }
221 220
222 bool VideoFrame::SetToBlack() { 221 bool VideoFrame::SetToBlack() {
223 return libyuv::I420Rect(GetYPlane(), GetYPitch(), 222 return libyuv::I420Rect(GetYPlane(), GetYPitch(),
224 GetUPlane(), GetUPitch(), 223 GetUPlane(), GetUPitch(),
225 GetVPlane(), GetVPitch(), 224 GetVPlane(), GetVPitch(),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 << " expected: " << expected_size 368 << " expected: " << expected_size
370 << " sample[0..3]: " << static_cast<int>(four_samples[0]) 369 << " sample[0..3]: " << static_cast<int>(four_samples[0])
371 << ", " << static_cast<int>(four_samples[1]) 370 << ", " << static_cast<int>(four_samples[1])
372 << ", " << static_cast<int>(four_samples[2]) 371 << ", " << static_cast<int>(four_samples[2])
373 << ", " << static_cast<int>(four_samples[3]); 372 << ", " << static_cast<int>(four_samples[3]);
374 } 373 }
375 return true; 374 return true;
376 } 375 }
377 376
378 } // namespace cricket 377 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/videoframe.h ('k') | talk/media/base/videoframe_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698