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 <limits.h> | 5 #include <limits.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <climits> | 10 #include <climits> |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 int32_t last_audio_frame_no_; | 541 int32_t last_audio_frame_no_; |
542 }; | 542 }; |
543 | 543 |
544 } // namespace cast | 544 } // namespace cast |
545 } // namespace media | 545 } // namespace media |
546 | 546 |
547 int main(int argc, char** argv) { | 547 int main(int argc, char** argv) { |
548 base::AtExitManager at_exit; | 548 base::AtExitManager at_exit; |
549 base::CommandLine::Init(argc, argv); | 549 base::CommandLine::Init(argc, argv); |
550 InitLogging(logging::LoggingSettings()); | 550 InitLogging(logging::LoggingSettings()); |
551 base::MessageLoop message_loop; | |
552 | 551 |
553 scoped_refptr<media::cast::CastEnvironment> cast_environment( | 552 scoped_refptr<media::cast::CastEnvironment> cast_environment( |
554 new media::cast::StandaloneCastEnvironment); | 553 new media::cast::StandaloneCastEnvironment); |
555 | 554 |
556 // Start up Chromium audio system. | 555 // Start up Chromium audio system. |
557 const media::ScopedAudioManagerPtr audio_manager( | 556 media::FakeAudioLogFactory fake_audio_log_factory_; |
558 media::AudioManager::CreateForTesting( | 557 const scoped_ptr<media::AudioManager> audio_manager( |
559 base::ThreadTaskRunnerHandle::Get())); | 558 media::AudioManager::Create(&fake_audio_log_factory_)); |
560 CHECK(media::AudioManager::Get()); | 559 CHECK(media::AudioManager::Get()); |
561 | 560 |
562 media::cast::FrameReceiverConfig audio_config = | 561 media::cast::FrameReceiverConfig audio_config = |
563 media::cast::GetAudioReceiverConfig(); | 562 media::cast::GetAudioReceiverConfig(); |
564 media::cast::FrameReceiverConfig video_config = | 563 media::cast::FrameReceiverConfig video_config = |
565 media::cast::GetVideoReceiverConfig(); | 564 media::cast::GetVideoReceiverConfig(); |
566 | 565 |
567 // Determine local and remote endpoints. | 566 // Determine local and remote endpoints. |
568 uint16_t remote_port, local_port; | 567 uint16_t remote_port, local_port; |
569 media::cast::GetPorts(&remote_port, &local_port); | 568 media::cast::GetPorts(&remote_port, &local_port); |
(...skipping 24 matching lines...) Expand all Loading... |
594 #endif // defined(USE_X11) | 593 #endif // defined(USE_X11) |
595 media::cast::NaivePlayer player(cast_environment, | 594 media::cast::NaivePlayer player(cast_environment, |
596 local_end_point, | 595 local_end_point, |
597 remote_end_point, | 596 remote_end_point, |
598 audio_config, | 597 audio_config, |
599 video_config, | 598 video_config, |
600 window_width, | 599 window_width, |
601 window_height); | 600 window_height); |
602 player.Start(); | 601 player.Start(); |
603 | 602 |
604 message_loop.Run(); // Run forever (i.e., until SIGTERM). | 603 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). |
605 NOTREACHED(); | 604 NOTREACHED(); |
606 return 0; | 605 return 0; |
607 } | 606 } |
OLD | NEW |