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

Side by Side Diff: media/cast/sender/h264_vt_encoder_unittest.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/video_frame.cc ('k') | media/gpu/v4l2_image_processor.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 int count_frames_checked_; 174 int count_frames_checked_;
175 175
176 DISALLOW_COPY_AND_ASSIGN(EndToEndFrameChecker); 176 DISALLOW_COPY_AND_ASSIGN(EndToEndFrameChecker);
177 }; 177 };
178 178
179 void CreateFrameAndMemsetPlane(VideoFrameFactory* const video_frame_factory) { 179 void CreateFrameAndMemsetPlane(VideoFrameFactory* const video_frame_factory) {
180 const scoped_refptr<media::VideoFrame> video_frame = 180 const scoped_refptr<media::VideoFrame> video_frame =
181 video_frame_factory->MaybeCreateFrame( 181 video_frame_factory->MaybeCreateFrame(
182 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()); 182 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta());
183 ASSERT_TRUE(video_frame.get()); 183 ASSERT_TRUE(video_frame.get());
184 auto* cv_pixel_buffer = video_frame->cv_pixel_buffer(); 184 auto* cv_pixel_buffer = video_frame->CvPixelBuffer();
185 ASSERT_TRUE(cv_pixel_buffer); 185 ASSERT_TRUE(cv_pixel_buffer);
186 CVPixelBufferLockBaseAddress(cv_pixel_buffer, 0); 186 CVPixelBufferLockBaseAddress(cv_pixel_buffer, 0);
187 auto* ptr = CVPixelBufferGetBaseAddressOfPlane(cv_pixel_buffer, 0); 187 auto* ptr = CVPixelBufferGetBaseAddressOfPlane(cv_pixel_buffer, 0);
188 ASSERT_TRUE(ptr); 188 ASSERT_TRUE(ptr);
189 memset(ptr, 0xfe, CVPixelBufferGetBytesPerRowOfPlane(cv_pixel_buffer, 0) * 189 memset(ptr, 0xfe, CVPixelBufferGetBytesPerRowOfPlane(cv_pixel_buffer, 0) *
190 CVPixelBufferGetHeightOfPlane(cv_pixel_buffer, 0)); 190 CVPixelBufferGetHeightOfPlane(cv_pixel_buffer, 0));
191 CVPixelBufferUnlockBaseAddress(cv_pixel_buffer, 0); 191 CVPixelBufferUnlockBaseAddress(cv_pixel_buffer, 0);
192 } 192 }
193 193
194 void NoopFrameEncodedCallback( 194 void NoopFrameEncodedCallback(
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 407 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
408 408
409 // After a power resume event, the factory should produce frames right away 409 // After a power resume event, the factory should produce frames right away
410 // because the encoder re-initializes on its own. 410 // because the encoder re-initializes on its own.
411 power_source_->GenerateResumeEvent(); 411 power_source_->GenerateResumeEvent();
412 CreateFrameAndMemsetPlane(video_frame_factory.get()); 412 CreateFrameAndMemsetPlane(video_frame_factory.get());
413 } 413 }
414 414
415 } // namespace cast 415 } // namespace cast
416 } // namespace media 416 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/gpu/v4l2_image_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698