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

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

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « media/base/decoder_buffer_unittest.cc ('k') | media/base/video_frame_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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 // static 120 // static
121 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame( 121 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame(
122 const gfx::Size& size, 122 const gfx::Size& size,
123 uint8 y, uint8 u, uint8 v, 123 uint8 y, uint8 u, uint8 v,
124 base::TimeDelta timestamp) { 124 base::TimeDelta timestamp) {
125 DCHECK(IsValidConfig(VideoFrame::YV12, size, gfx::Rect(size), size)); 125 DCHECK(IsValidConfig(VideoFrame::YV12, size, gfx::Rect(size), size));
126 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( 126 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
127 VideoFrame::YV12, size, gfx::Rect(size), size, timestamp); 127 VideoFrame::YV12, size, gfx::Rect(size), size, timestamp);
128 FillYUV(frame, y, u, v); 128 FillYUV(frame.get(), y, u, v);
129 return frame; 129 return frame;
130 } 130 }
131 131
132 // static 132 // static
133 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) { 133 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) {
134 const uint8 kBlackY = 0x00; 134 const uint8 kBlackY = 0x00;
135 const uint8 kBlackUV = 0x80; 135 const uint8 kBlackUV = 0x80;
136 const base::TimeDelta kZero; 136 const base::TimeDelta kZero;
137 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero); 137 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero);
138 } 138 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 break; 360 break;
361 for (int row = 0; row < rows(plane); ++row) { 361 for (int row = 0; row < rows(plane); ++row) {
362 base::MD5Update(context, base::StringPiece( 362 base::MD5Update(context, base::StringPiece(
363 reinterpret_cast<char*>(data(plane) + stride(plane) * row), 363 reinterpret_cast<char*>(data(plane) + stride(plane) * row),
364 row_bytes(plane))); 364 row_bytes(plane)));
365 } 365 }
366 } 366 }
367 } 367 }
368 368
369 } // namespace media 369 } // namespace media
OLDNEW
« no previous file with comments | « media/base/decoder_buffer_unittest.cc ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698