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

Side by Side Diff: media/base/video_util_unittest.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/video_frame_unittest.cc ('k') | media/crypto/aes_decryptor.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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "media/base/video_frame.h" 6 #include "media/base/video_frame.h"
7 #include "media/base/video_util.h" 7 #include "media/base/video_util.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 void CreateDestinationFrame(int width, int height) { 39 void CreateDestinationFrame(int width, int height) {
40 gfx::Size size(width, height); 40 gfx::Size size(width, height);
41 destination_frame_ = 41 destination_frame_ =
42 VideoFrame::CreateFrame(VideoFrame::YV12, size, gfx::Rect(size), size, 42 VideoFrame::CreateFrame(VideoFrame::YV12, size, gfx::Rect(size), size,
43 base::TimeDelta()); 43 base::TimeDelta());
44 } 44 }
45 45
46 void CopyPlanes() { 46 void CopyPlanes() {
47 CopyYPlane(y_plane_.get(), y_stride_, height_, destination_frame_); 47 CopyYPlane(y_plane_.get(), y_stride_, height_, destination_frame_.get());
48 CopyUPlane(u_plane_.get(), u_stride_, height_ / 2, destination_frame_); 48 CopyUPlane(
49 CopyVPlane(v_plane_.get(), v_stride_, height_ / 2, destination_frame_); 49 u_plane_.get(), u_stride_, height_ / 2, destination_frame_.get());
50 CopyVPlane(
51 v_plane_.get(), v_stride_, height_ / 2, destination_frame_.get());
50 } 52 }
51 53
52 private: 54 private:
53 scoped_ptr<uint8[]> y_plane_; 55 scoped_ptr<uint8[]> y_plane_;
54 scoped_ptr<uint8[]> u_plane_; 56 scoped_ptr<uint8[]> u_plane_;
55 scoped_ptr<uint8[]> v_plane_; 57 scoped_ptr<uint8[]> v_plane_;
56 58
57 int height_; 59 int height_;
58 int y_stride_; 60 int y_stride_;
59 int u_stride_; 61 int u_stride_;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 inside ? 0x03 : 0x80); 380 inside ? 0x03 : 0x80);
379 } 381 }
380 } 382 }
381 } 383 }
382 } 384 }
383 } 385 }
384 } 386 }
385 } 387 }
386 388
387 } // namespace media 389 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/crypto/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698