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

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

Issue 2529493002: mac: Remove more media/base/mac glue unneeded now that we target 10.9 (Closed)
Patch Set: . Created 4 years, 1 month 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/device_monitors/device_monitor_mac.mm » ('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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 private: 204 private:
205 bool IsOnBatteryPowerImpl() final { return false; } 205 bool IsOnBatteryPowerImpl() final { return false; }
206 }; 206 };
207 207
208 class H264VideoToolboxEncoderTest : public ::testing::Test { 208 class H264VideoToolboxEncoderTest : public ::testing::Test {
209 protected: 209 protected:
210 H264VideoToolboxEncoderTest() = default; 210 H264VideoToolboxEncoderTest() = default;
211 211
212 void SetUp() final { 212 void SetUp() final {
213 CHECK(VideoToolboxGlue::Get())
214 << "VideoToolbox is not available. Requires OS X 10.8 or iOS 8.0.";
215 clock_ = new base::SimpleTestTickClock(); 213 clock_ = new base::SimpleTestTickClock();
216 clock_->Advance(base::TimeTicks::Now() - base::TimeTicks()); 214 clock_->Advance(base::TimeTicks::Now() - base::TimeTicks());
217 215
218 power_source_ = new TestPowerSource(); 216 power_source_ = new TestPowerSource();
219 power_monitor_.reset(new base::PowerMonitor( 217 power_monitor_.reset(new base::PowerMonitor(
220 std::unique_ptr<TestPowerSource>(power_source_))); 218 std::unique_ptr<TestPowerSource>(power_source_)));
221 219
222 cast_environment_ = new CastEnvironment( 220 cast_environment_ = new CastEnvironment(
223 std::unique_ptr<base::TickClock>(clock_), message_loop_.task_runner(), 221 std::unique_ptr<base::TickClock>(clock_), message_loop_.task_runner(),
224 message_loop_.task_runner(), message_loop_.task_runner()); 222 message_loop_.task_runner(), message_loop_.task_runner());
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 403 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
406 404
407 // After a power resume event, the factory should produce frames right away 405 // After a power resume event, the factory should produce frames right away
408 // because the encoder re-initializes on its own. 406 // because the encoder re-initializes on its own.
409 power_source_->GenerateResumeEvent(); 407 power_source_->GenerateResumeEvent();
410 CreateFrameAndMemsetPlane(video_frame_factory.get()); 408 CreateFrameAndMemsetPlane(video_frame_factory.get());
411 } 409 }
412 410
413 } // namespace cast 411 } // namespace cast
414 } // namespace media 412 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/h264_vt_encoder.cc ('k') | media/device_monitors/device_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698