OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 video_config.min_bitrate = 1000000; | 146 video_config.min_bitrate = 1000000; |
147 video_config.start_bitrate = 1000000; | 147 video_config.start_bitrate = 1000000; |
148 video_config.max_qp = 56; | 148 video_config.max_qp = 56; |
149 video_config.min_qp = 0; | 149 video_config.min_qp = 0; |
150 video_config.max_frame_rate = 30; | 150 video_config.max_frame_rate = 30; |
151 video_config.max_number_of_video_buffers_used = 1; | 151 video_config.max_number_of_video_buffers_used = 1; |
152 video_config.codec = transport::kVp8; | 152 video_config.codec = transport::kVp8; |
153 | 153 |
154 if (external) { | 154 if (external) { |
155 scoped_ptr<VideoEncodeAccelerator> fake_vea( | 155 scoped_ptr<VideoEncodeAccelerator> fake_vea( |
156 new test::FakeVideoEncodeAccelerator()); | 156 new test::FakeVideoEncodeAccelerator(task_runner_)); |
157 video_sender_.reset( | 157 video_sender_.reset( |
158 new PeerVideoSender(cast_environment_, | 158 new PeerVideoSender(cast_environment_, |
159 video_config, | 159 video_config, |
160 base::Bind(&CreateVideoEncodeAccelerator, | 160 base::Bind(&CreateVideoEncodeAccelerator, |
161 task_runner_, | 161 task_runner_, |
162 base::Passed(&fake_vea)), | 162 base::Passed(&fake_vea)), |
163 base::Bind(&CreateSharedMemory), | 163 base::Bind(&CreateSharedMemory), |
164 base::Bind(&VideoSenderTest::InitializationResult, | 164 base::Bind(&VideoSenderTest::InitializationResult, |
165 base::Unretained(this)), | 165 base::Unretained(this)), |
166 transport_sender_.get())); | 166 transport_sender_.get())); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // Empty the pipeline. | 363 // Empty the pipeline. |
364 RunTasks(100); | 364 RunTasks(100); |
365 // Should have sent at least 7 packets. | 365 // Should have sent at least 7 packets. |
366 EXPECT_GE( | 366 EXPECT_GE( |
367 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), | 367 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), |
368 7); | 368 7); |
369 } | 369 } |
370 | 370 |
371 } // namespace cast | 371 } // namespace cast |
372 } // namespace media | 372 } // namespace media |
OLD | NEW |