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 // Test application that simulates a cast sender - Data can be either generated | 5 // Test application that simulates a cast sender - Data can be either generated |
6 // or read from a file. | 6 // or read from a file. |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 video_config.rtcp_c_name = "video_sender@a.b.c.d"; | 209 video_config.rtcp_c_name = "video_sender@a.b.c.d"; |
210 | 210 |
211 video_config.use_external_encoder = false; | 211 video_config.use_external_encoder = false; |
212 | 212 |
213 VLOG(0) << "Using VP8 at 30 fps"; | 213 VLOG(0) << "Using VP8 at 30 fps"; |
214 video_config.min_qp = 4; | 214 video_config.min_qp = 4; |
215 video_config.max_qp = 40; | 215 video_config.max_qp = 40; |
216 video_config.max_frame_rate = 30; | 216 video_config.max_frame_rate = 30; |
217 video_config.codec = transport::kVp8; | 217 video_config.codec = transport::kVp8; |
218 video_config.max_number_of_video_buffers_used = 1; | 218 video_config.max_number_of_video_buffers_used = 1; |
219 video_config.number_of_cores = 1; | |
220 return video_config; | 219 return video_config; |
221 } | 220 } |
222 | 221 |
223 class SendProcess { | 222 class SendProcess { |
224 public: | 223 public: |
225 SendProcess(scoped_refptr<base::SingleThreadTaskRunner> thread_proxy, | 224 SendProcess(scoped_refptr<base::SingleThreadTaskRunner> thread_proxy, |
226 base::TickClock* clock, | 225 base::TickClock* clock, |
227 const VideoSenderConfig& video_config, | 226 const VideoSenderConfig& video_config, |
228 scoped_refptr<AudioFrameInput> audio_frame_input, | 227 scoped_refptr<AudioFrameInput> audio_frame_input, |
229 scoped_refptr<VideoFrameInput> video_frame_input) | 228 scoped_refptr<VideoFrameInput> video_frame_input) |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 | 563 |
565 test_thread.message_loop_proxy()->PostTask( | 564 test_thread.message_loop_proxy()->PostTask( |
566 FROM_HERE, | 565 FROM_HERE, |
567 base::Bind(&media::cast::SendProcess::SendFrame, | 566 base::Bind(&media::cast::SendProcess::SendFrame, |
568 base::Unretained(send_process.get()))); | 567 base::Unretained(send_process.get()))); |
569 | 568 |
570 io_message_loop.Run(); | 569 io_message_loop.Run(); |
571 | 570 |
572 return 0; | 571 return 0; |
573 } | 572 } |
OLD | NEW |