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

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

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 video_config_.min_bitrate = 1000000; 76 video_config_.min_bitrate = 1000000;
77 video_config_.start_bitrate = 2000000; 77 video_config_.start_bitrate = 2000000;
78 video_config_.max_qp = 56; 78 video_config_.max_qp = 56;
79 video_config_.min_qp = 0; 79 video_config_.min_qp = 0;
80 video_config_.max_frame_rate = 30; 80 video_config_.max_frame_rate = 30;
81 video_config_.max_number_of_video_buffers_used = 3; 81 video_config_.max_number_of_video_buffers_used = 3;
82 video_config_.codec = CODEC_VIDEO_VP8; 82 video_config_.codec = CODEC_VIDEO_VP8;
83 gfx::Size size(video_config_.width, video_config_.height); 83 gfx::Size size(video_config_.width, video_config_.height);
84 video_frame_ = media::VideoFrame::CreateFrame( 84 video_frame_ = media::VideoFrame::CreateFrame(
85 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta()); 85 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta());
86 PopulateVideoFrame(video_frame_, 123); 86 PopulateVideoFrame(video_frame_.get(), 123);
87 } 87 }
88 88
89 virtual ~VideoEncoderImplTest() {} 89 virtual ~VideoEncoderImplTest() {}
90 90
91 virtual void SetUp() OVERRIDE { 91 virtual void SetUp() OVERRIDE {
92 testing_clock_ = new base::SimpleTestTickClock(); 92 testing_clock_ = new base::SimpleTestTickClock();
93 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); 93 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_);
94 cast_environment_ = 94 cast_environment_ =
95 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), 95 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(),
96 task_runner_, 96 task_runner_,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 for (int i = 5; i < 17; ++i) { 251 for (int i = 5; i < 17; ++i) {
252 test_video_encoder_callback_->SetExpectedResult(i, 4, capture_time); 252 test_video_encoder_callback_->SetExpectedResult(i, 4, capture_time);
253 EXPECT_TRUE(video_encoder_->EncodeVideoFrame( 253 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(
254 video_frame_, capture_time, frame_encoded_callback)); 254 video_frame_, capture_time, frame_encoded_callback));
255 task_runner_->RunTasks(); 255 task_runner_->RunTasks();
256 } 256 }
257 } 257 }
258 258
259 } // namespace cast 259 } // namespace cast
260 } // namespace media 260 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698