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

Side by Side Diff: media/base/mac/video_frame_mac_unittests.cc

Issue 2781283002: Rename functions in video frame to comply with Style Guide (Closed)
Patch Set: Fixed compilation errors for MAC Created 3 years, 8 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 | « media/base/mac/video_frame_mac.cc ('k') | media/base/video_frame.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 // 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/mac/video_frame_mac.h" 5 #include "media/base/mac/video_frame_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 const gfx::Size size(kWidth, kHeight); 117 const gfx::Size size(kWidth, kHeight);
118 for (const auto& format_pair : format_pairs) { 118 for (const auto& format_pair : format_pairs) {
119 base::ScopedCFTypeRef<CVPixelBufferRef> pb; 119 base::ScopedCFTypeRef<CVPixelBufferRef> pb;
120 CVPixelBufferCreate(nullptr, kWidth, kHeight, format_pair.corevideo, 120 CVPixelBufferCreate(nullptr, kWidth, kHeight, format_pair.corevideo,
121 nullptr, pb.InitializeInto()); 121 nullptr, pb.InitializeInto());
122 ASSERT_TRUE(pb.get()); 122 ASSERT_TRUE(pb.get());
123 123
124 auto frame = VideoFrame::WrapCVPixelBuffer(pb.get(), kTimestamp); 124 auto frame = VideoFrame::WrapCVPixelBuffer(pb.get(), kTimestamp);
125 ASSERT_TRUE(frame.get()); 125 ASSERT_TRUE(frame.get());
126 EXPECT_EQ(pb.get(), frame->cv_pixel_buffer()); 126 EXPECT_EQ(pb.get(), frame->CvPixelBuffer());
127 EXPECT_EQ(format_pair.chrome, frame->format()); 127 EXPECT_EQ(format_pair.chrome, frame->format());
128 128
129 frame = nullptr; 129 frame = nullptr;
130 EXPECT_EQ(1, CFGetRetainCount(pb.get())); 130 EXPECT_EQ(1, CFGetRetainCount(pb.get()));
131 } 131 }
132 } 132 }
133 133
134 static void FillFrameWithPredictableValues(const VideoFrame& frame) { 134 static void FillFrameWithPredictableValues(const VideoFrame& frame) {
135 for (size_t i = 0; i < VideoFrame::NumPlanes(frame.format()); ++i) { 135 for (size_t i = 0; i < VideoFrame::NumPlanes(frame.format()); ++i) {
136 const gfx::Size& size = 136 const gfx::Size& size =
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const int index = row_index + w; 187 const int index = row_index + w;
188 EXPECT_EQ(static_cast<uint8_t>((w + offset) ^ (h + offset)), 188 EXPECT_EQ(static_cast<uint8_t>((w + offset) ^ (h + offset)),
189 plane_ptr[index]); 189 plane_ptr[index]);
190 } 190 }
191 } 191 }
192 } 192 }
193 CVPixelBufferUnlockBaseAddress(pb, 0); 193 CVPixelBufferUnlockBaseAddress(pb, 0);
194 } 194 }
195 195
196 } // namespace media 196 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mac/video_frame_mac.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698