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

Side by Side Diff: media/cast/sender/h264_vt_encoder_unittest.cc

Issue 2181163002: media: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/cast/sender/h264_vt_encoder.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 int count_frames_checked_; 170 int count_frames_checked_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(EndToEndFrameChecker); 172 DISALLOW_COPY_AND_ASSIGN(EndToEndFrameChecker);
173 }; 173 };
174 174
175 void CreateFrameAndMemsetPlane(VideoFrameFactory* const video_frame_factory) { 175 void CreateFrameAndMemsetPlane(VideoFrameFactory* const video_frame_factory) {
176 const scoped_refptr<media::VideoFrame> video_frame = 176 const scoped_refptr<media::VideoFrame> video_frame =
177 video_frame_factory->MaybeCreateFrame( 177 video_frame_factory->MaybeCreateFrame(
178 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()); 178 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta());
179 ASSERT_TRUE(video_frame.get()); 179 ASSERT_TRUE(video_frame.get());
180 auto cv_pixel_buffer = video_frame->cv_pixel_buffer(); 180 auto* cv_pixel_buffer = video_frame->cv_pixel_buffer();
181 ASSERT_TRUE(cv_pixel_buffer); 181 ASSERT_TRUE(cv_pixel_buffer);
182 CVPixelBufferLockBaseAddress(cv_pixel_buffer, 0); 182 CVPixelBufferLockBaseAddress(cv_pixel_buffer, 0);
183 auto ptr = CVPixelBufferGetBaseAddressOfPlane(cv_pixel_buffer, 0); 183 auto* ptr = CVPixelBufferGetBaseAddressOfPlane(cv_pixel_buffer, 0);
184 ASSERT_TRUE(ptr); 184 ASSERT_TRUE(ptr);
185 memset(ptr, 0xfe, CVPixelBufferGetBytesPerRowOfPlane(cv_pixel_buffer, 0) * 185 memset(ptr, 0xfe, CVPixelBufferGetBytesPerRowOfPlane(cv_pixel_buffer, 0) *
186 CVPixelBufferGetHeightOfPlane(cv_pixel_buffer, 0)); 186 CVPixelBufferGetHeightOfPlane(cv_pixel_buffer, 0));
187 CVPixelBufferUnlockBaseAddress(cv_pixel_buffer, 0); 187 CVPixelBufferUnlockBaseAddress(cv_pixel_buffer, 0);
188 } 188 }
189 189
190 void NoopFrameEncodedCallback( 190 void NoopFrameEncodedCallback(
191 std::unique_ptr<media::cast::SenderEncodedFrame> /*encoded_frame*/) {} 191 std::unique_ptr<media::cast::SenderEncodedFrame> /*encoded_frame*/) {}
192 192
193 class TestPowerSource : public base::PowerMonitorSource { 193 class TestPowerSource : public base::PowerMonitorSource {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 405 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
406 406
407 // After a power resume event, the factory should produce frames right away 407 // After a power resume event, the factory should produce frames right away
408 // because the encoder re-initializes on its own. 408 // because the encoder re-initializes on its own.
409 power_source_->GenerateResumeEvent(); 409 power_source_->GenerateResumeEvent();
410 CreateFrameAndMemsetPlane(video_frame_factory.get()); 410 CreateFrameAndMemsetPlane(video_frame_factory.get());
411 } 411 }
412 412
413 } // namespace cast 413 } // namespace cast
414 } // namespace media 414 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/h264_vt_encoder.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698