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

Side by Side Diff: media/base/video_frame.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | « media/base/pipeline.cc ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/video_frame.h" 5 #include "media/base/video_frame.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/video_util.h" 10 #include "media/base/video_util.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 // static 87 // static
88 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame( 88 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame(
89 const gfx::Size& size, 89 const gfx::Size& size,
90 uint8 y, uint8 u, uint8 v, 90 uint8 y, uint8 u, uint8 v,
91 base::TimeDelta timestamp) { 91 base::TimeDelta timestamp) {
92 DCHECK(IsValidConfig(VideoFrame::YV12, size, size)); 92 DCHECK(IsValidConfig(VideoFrame::YV12, size, size));
93 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( 93 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
94 VideoFrame::YV12, size, size, timestamp); 94 VideoFrame::YV12, size, size, timestamp);
95 FillYUV(frame, y, u, v); 95 FillYUV(frame.get(), y, u, v);
96 return frame; 96 return frame;
97 } 97 }
98 98
99 // static 99 // static
100 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) { 100 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) {
101 const uint8 kBlackY = 0x00; 101 const uint8 kBlackY = 0x00;
102 const uint8 kBlackUV = 0x80; 102 const uint8 kBlackUV = 0x80;
103 const base::TimeDelta kZero; 103 const base::TimeDelta kZero;
104 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero); 104 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero);
105 } 105 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 break; 307 break;
308 for(int row = 0; row < rows(plane); row++) { 308 for(int row = 0; row < rows(plane); row++) {
309 base::MD5Update(context, base::StringPiece( 309 base::MD5Update(context, base::StringPiece(
310 reinterpret_cast<char*>(data(plane) + stride(plane) * row), 310 reinterpret_cast<char*>(data(plane) + stride(plane) * row),
311 row_bytes(plane))); 311 row_bytes(plane)));
312 } 312 }
313 } 313 }
314 } 314 }
315 315
316 } // namespace media 316 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.cc ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698