| OLD | NEW |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 size, gfx::Rect(size), size, base::TimeDelta()); | 85 size, gfx::Rect(size), size, base::TimeDelta()); |
| 86 PopulateVideoFrame(video_frame_, 123); | 86 PopulateVideoFrame(video_frame_, 123); |
| 87 } | 87 } |
| 88 | 88 |
| 89 virtual ~ExternalVideoEncoderTest() {} | 89 virtual ~ExternalVideoEncoderTest() {} |
| 90 | 90 |
| 91 virtual void SetUp() { | 91 virtual void SetUp() { |
| 92 task_runner_ = new test::FakeTaskRunner(&testing_clock_); | 92 task_runner_ = new test::FakeTaskRunner(&testing_clock_); |
| 93 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, | 93 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, |
| 94 task_runner_, task_runner_, task_runner_, task_runner_, task_runner_, | 94 task_runner_, task_runner_, task_runner_, task_runner_, task_runner_, |
| 95 GetDefaultCastLoggingConfig()); | 95 GetDefaultCastSenderLoggingConfig()); |
| 96 video_encoder_.reset(new ExternalVideoEncoder( | 96 video_encoder_.reset(new ExternalVideoEncoder( |
| 97 cast_environment_, | 97 cast_environment_, |
| 98 video_config_, | 98 video_config_, |
| 99 new test::FakeGpuVideoAcceleratorFactories(task_runner_))); | 99 new test::FakeGpuVideoAcceleratorFactories(task_runner_))); |
| 100 } | 100 } |
| 101 | 101 |
| 102 base::SimpleTestTickClock testing_clock_; | 102 base::SimpleTestTickClock testing_clock_; |
| 103 scoped_refptr<TestVideoEncoderCallback> test_video_encoder_callback_; | 103 scoped_refptr<TestVideoEncoderCallback> test_video_encoder_callback_; |
| 104 VideoSenderConfig video_config_; | 104 VideoSenderConfig video_config_; |
| 105 scoped_refptr<test::FakeTaskRunner> task_runner_; | 105 scoped_refptr<test::FakeTaskRunner> task_runner_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 130 frame_encoded_callback)); | 130 frame_encoded_callback)); |
| 131 task_runner_->RunTasks(); | 131 task_runner_->RunTasks(); |
| 132 } | 132 } |
| 133 // We need to run the task to cleanup the GPU instance. | 133 // We need to run the task to cleanup the GPU instance. |
| 134 video_encoder_.reset(NULL); | 134 video_encoder_.reset(NULL); |
| 135 task_runner_->RunTasks(); | 135 task_runner_->RunTasks(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace cast | 138 } // namespace cast |
| 139 } // namespace media | 139 } // namespace media |
| OLD | NEW |