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 <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 | 278 |
279 int main(int argc, char** argv) { | 279 int main(int argc, char** argv) { |
280 base::AtExitManager at_exit; | 280 base::AtExitManager at_exit; |
281 VLOG(1) << "Cast Sender"; | 281 VLOG(1) << "Cast Sender"; |
282 base::DefaultTickClock clock; | 282 base::DefaultTickClock clock; |
283 base::MessageLoopForIO main_message_loop; | 283 base::MessageLoopForIO main_message_loop; |
284 scoped_refptr<base::SequencedTaskRunner> | 284 scoped_refptr<base::SequencedTaskRunner> |
285 task_runner(main_message_loop.message_loop_proxy()); | 285 task_runner(main_message_loop.message_loop_proxy()); |
286 | 286 |
287 // Enable main and send side threads only. | 287 // Enable main and send side threads only. Disable logging. |
288 scoped_refptr<media::cast::CastEnvironment> cast_environment(new | 288 scoped_refptr<media::cast::CastEnvironment> cast_environment(new |
289 media::cast::CastEnvironment(&clock, task_runner, task_runner, NULL, | 289 media::cast::CastEnvironment(&clock, task_runner, task_runner, NULL, |
290 task_runner, NULL)); | 290 task_runner, NULL, false, false, false)); |
291 | 291 |
292 media::cast::AudioSenderConfig audio_config = | 292 media::cast::AudioSenderConfig audio_config = |
293 media::cast::GetAudioSenderConfig(); | 293 media::cast::GetAudioSenderConfig(); |
294 media::cast::VideoSenderConfig video_config = | 294 media::cast::VideoSenderConfig video_config = |
295 media::cast::GetVideoSenderConfig(); | 295 media::cast::GetVideoSenderConfig(); |
296 | 296 |
297 scoped_ptr<media::cast::test::Transport> | 297 scoped_ptr<media::cast::test::Transport> |
298 transport(new media::cast::test::Transport(cast_environment)); | 298 transport(new media::cast::test::Transport(cast_environment)); |
299 scoped_ptr<media::cast::CastSender> cast_sender( | 299 scoped_ptr<media::cast::CastSender> cast_sender( |
300 media::cast::CastSender::CreateCastSender(cast_environment, | 300 media::cast::CastSender::CreateCastSender(cast_environment, |
(...skipping 15 matching lines...) Expand all Loading... |
316 | 316 |
317 media::cast::FrameInput* frame_input = cast_sender->frame_input(); | 317 media::cast::FrameInput* frame_input = cast_sender->frame_input(); |
318 scoped_ptr<media::cast::SendProcess> send_process(new | 318 scoped_ptr<media::cast::SendProcess> send_process(new |
319 media::cast::SendProcess(cast_environment, video_config, frame_input)); | 319 media::cast::SendProcess(cast_environment, video_config, frame_input)); |
320 | 320 |
321 send_process->SendFrame(); | 321 send_process->SendFrame(); |
322 main_message_loop.Run(); | 322 main_message_loop.Run(); |
323 transport->StopReceiving(); | 323 transport->StopReceiving(); |
324 return 0; | 324 return 0; |
325 } | 325 } |
OLD | NEW |