| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/at_exit.h" | 14 #include "base/at_exit.h" |
| 15 #include "base/base_paths.h" | 15 #include "base/base_paths.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
| 18 #include "base/json/json_writer.h" | 18 #include "base/json/json_writer.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/memory/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
| 21 #include "base/message_loop/message_loop.h" |
| 21 #include "base/path_service.h" | 22 #include "base/path_service.h" |
| 22 #include "base/run_loop.h" | 23 #include "base/run_loop.h" |
| 23 #include "base/single_thread_task_runner.h" | 24 #include "base/single_thread_task_runner.h" |
| 24 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
| 25 #include "base/threading/thread.h" | 26 #include "base/threading/thread.h" |
| 26 #include "base/time/default_tick_clock.h" | 27 #include "base/time/default_tick_clock.h" |
| 27 #include "base/values.h" | 28 #include "base/values.h" |
| 28 #include "media/base/media.h" | 29 #include "media/base/media.h" |
| 29 #include "media/base/video_frame.h" | 30 #include "media/base/video_frame.h" |
| 30 #include "media/cast/cast_config.h" | 31 #include "media/cast/cast_config.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 FROM_HERE, base::Bind(&media::cast::CastSender::InitializeAudio, | 350 FROM_HERE, base::Bind(&media::cast::CastSender::InitializeAudio, |
| 350 base::Unretained(cast_sender.get()), audio_config, | 351 base::Unretained(cast_sender.get()), audio_config, |
| 351 base::Bind(&QuitLoopOnInitializationResult))); | 352 base::Bind(&QuitLoopOnInitializationResult))); |
| 352 base::RunLoop().Run(); // Wait for audio initialization. | 353 base::RunLoop().Run(); // Wait for audio initialization. |
| 353 | 354 |
| 354 fake_media_source->Start(cast_sender->audio_frame_input(), | 355 fake_media_source->Start(cast_sender->audio_frame_input(), |
| 355 cast_sender->video_frame_input()); | 356 cast_sender->video_frame_input()); |
| 356 base::RunLoop().Run(); | 357 base::RunLoop().Run(); |
| 357 return 0; | 358 return 0; |
| 358 } | 359 } |
| OLD | NEW |