| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 video_config_.min_bitrate = 1000000; | 110 video_config_.min_bitrate = 1000000; |
| 111 video_config_.start_bitrate = 2000000; | 111 video_config_.start_bitrate = 2000000; |
| 112 video_config_.max_qp = 56; | 112 video_config_.max_qp = 56; |
| 113 video_config_.min_qp = 0; | 113 video_config_.min_qp = 0; |
| 114 video_config_.max_frame_rate = 30; | 114 video_config_.max_frame_rate = 30; |
| 115 video_config_.max_number_of_video_buffers_used = 3; | 115 video_config_.max_number_of_video_buffers_used = 3; |
| 116 video_config_.codec = CODEC_VIDEO_VP8; | 116 video_config_.codec = CODEC_VIDEO_VP8; |
| 117 gfx::Size size(video_config_.width, video_config_.height); | 117 gfx::Size size(video_config_.width, video_config_.height); |
| 118 video_frame_ = media::VideoFrame::CreateFrame( | 118 video_frame_ = media::VideoFrame::CreateFrame( |
| 119 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta()); | 119 VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta()); |
| 120 PopulateVideoFrame(video_frame_, 123); | 120 PopulateVideoFrame(video_frame_.get(), 123); |
| 121 | 121 |
| 122 testing_clock_ = new base::SimpleTestTickClock(); | 122 testing_clock_ = new base::SimpleTestTickClock(); |
| 123 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); | 123 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); |
| 124 cast_environment_ = | 124 cast_environment_ = |
| 125 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), | 125 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), |
| 126 task_runner_, | 126 task_runner_, |
| 127 task_runner_, | 127 task_runner_, |
| 128 task_runner_); | 128 task_runner_); |
| 129 | 129 |
| 130 fake_vea_ = new test::FakeVideoEncodeAccelerator(task_runner_, | 130 fake_vea_ = new test::FakeVideoEncodeAccelerator(task_runner_, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 base::Unretained(&vea_factory)), | 233 base::Unretained(&vea_factory)), |
| 234 base::Bind(&CreateSharedMemory))); | 234 base::Bind(&CreateSharedMemory))); |
| 235 | 235 |
| 236 video_encoder.reset(); | 236 video_encoder.reset(); |
| 237 vea_factory.FinishCreatingVideoEncodeAccelerator(); | 237 vea_factory.FinishCreatingVideoEncodeAccelerator(); |
| 238 task_runner->RunTasks(); | 238 task_runner->RunTasks(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace cast | 241 } // namespace cast |
| 242 } // namespace media | 242 } // namespace media |
| OLD | NEW |