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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 int main(int argc, char** argv) { | 554 int main(int argc, char** argv) { |
555 base::AtExitManager at_exit; | 555 base::AtExitManager at_exit; |
556 base::CommandLine::Init(argc, argv); | 556 base::CommandLine::Init(argc, argv); |
557 InitLogging(logging::LoggingSettings()); | 557 InitLogging(logging::LoggingSettings()); |
558 base::MessageLoop message_loop; | 558 base::MessageLoop message_loop; |
559 | 559 |
560 scoped_refptr<media::cast::CastEnvironment> cast_environment( | 560 scoped_refptr<media::cast::CastEnvironment> cast_environment( |
561 new media::cast::StandaloneCastEnvironment); | 561 new media::cast::StandaloneCastEnvironment); |
562 | 562 |
563 // Start up Chromium audio system. | 563 // Start up Chromium audio system. |
564 const media::ScopedAudioManagerPtr audio_manager( | 564 auto audio_manager = media::AudioManager::CreateForTesting( |
565 media::AudioManager::CreateForTesting( | 565 base::ThreadTaskRunnerHandle::Get()); |
566 base::ThreadTaskRunnerHandle::Get())); | |
567 CHECK(media::AudioManager::Get()); | 566 CHECK(media::AudioManager::Get()); |
568 | 567 |
569 media::cast::FrameReceiverConfig audio_config = | 568 media::cast::FrameReceiverConfig audio_config = |
570 media::cast::GetAudioReceiverConfig(); | 569 media::cast::GetAudioReceiverConfig(); |
571 media::cast::FrameReceiverConfig video_config = | 570 media::cast::FrameReceiverConfig video_config = |
572 media::cast::GetVideoReceiverConfig(); | 571 media::cast::GetVideoReceiverConfig(); |
573 | 572 |
574 // Determine local and remote endpoints. | 573 // Determine local and remote endpoints. |
575 uint16_t remote_port, local_port; | 574 uint16_t remote_port, local_port; |
576 media::cast::GetPorts(&remote_port, &local_port); | 575 media::cast::GetPorts(&remote_port, &local_port); |
(...skipping 28 matching lines...) Expand all Loading... |
605 audio_config, | 604 audio_config, |
606 video_config, | 605 video_config, |
607 window_width, | 606 window_width, |
608 window_height); | 607 window_height); |
609 player.Start(); | 608 player.Start(); |
610 | 609 |
611 base::RunLoop().Run(); // Run forever (i.e., until SIGTERM). | 610 base::RunLoop().Run(); // Run forever (i.e., until SIGTERM). |
612 NOTREACHED(); | 611 NOTREACHED(); |
613 return 0; | 612 return 0; |
614 } | 613 } |
OLD | NEW |