| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <climits> | 6 #include <climits> |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include <cstdio> | 8 #include <cstdio> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 base::MessageLoopForIO main_message_loop; | 215 base::MessageLoopForIO main_message_loop; |
| 216 CommandLine::Init(argc, argv); | 216 CommandLine::Init(argc, argv); |
| 217 InitLogging(logging::LoggingSettings()); | 217 InitLogging(logging::LoggingSettings()); |
| 218 | 218 |
| 219 VLOG(1) << "Cast Receiver"; | 219 VLOG(1) << "Cast Receiver"; |
| 220 base::Thread audio_thread("Cast audio decoder thread"); | 220 base::Thread audio_thread("Cast audio decoder thread"); |
| 221 base::Thread video_thread("Cast video decoder thread"); | 221 base::Thread video_thread("Cast video decoder thread"); |
| 222 audio_thread.Start(); | 222 audio_thread.Start(); |
| 223 video_thread.Start(); | 223 video_thread.Start(); |
| 224 | 224 |
| 225 base::DefaultTickClock clock; | 225 scoped_ptr<base::TickClock> clock(new base::DefaultTickClock()); |
| 226 | 226 |
| 227 // Enable receiver side threads, and disable logging. | 227 // Enable receiver side threads, and disable logging. |
| 228 // Running transport on main thread. | 228 // Running transport on main thread. |
| 229 scoped_refptr<media::cast::CastEnvironment> cast_environment(new | 229 scoped_refptr<media::cast::CastEnvironment> cast_environment(new |
| 230 media::cast::CastEnvironment( | 230 media::cast::CastEnvironment( |
| 231 &clock, | 231 clock.Pass(), |
| 232 main_message_loop.message_loop_proxy(), | 232 main_message_loop.message_loop_proxy(), |
| 233 NULL, | 233 NULL, |
| 234 audio_thread.message_loop_proxy(), | 234 audio_thread.message_loop_proxy(), |
| 235 NULL, | 235 NULL, |
| 236 video_thread.message_loop_proxy(), | 236 video_thread.message_loop_proxy(), |
| 237 main_message_loop.message_loop_proxy(), | 237 main_message_loop.message_loop_proxy(), |
| 238 media::cast::GetDefaultCastReceiverLoggingConfig())); | 238 media::cast::GetDefaultCastReceiverLoggingConfig())); |
| 239 | 239 |
| 240 media::cast::AudioReceiverConfig audio_config = | 240 media::cast::AudioReceiverConfig audio_config = |
| 241 media::cast::GetAudioReceiverConfig(); | 241 media::cast::GetAudioReceiverConfig(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 cast_receiver->packet_receiver(); | 283 cast_receiver->packet_receiver(); |
| 284 | 284 |
| 285 transport->StartReceiving(packet_receiver); | 285 transport->StartReceiving(packet_receiver); |
| 286 | 286 |
| 287 scoped_refptr<media::cast::ReceiveProcess> receive_process( | 287 scoped_refptr<media::cast::ReceiveProcess> receive_process( |
| 288 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); | 288 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); |
| 289 receive_process->Start(); | 289 receive_process->Start(); |
| 290 main_message_loop.Run(); | 290 main_message_loop.Run(); |
| 291 return 0; | 291 return 0; |
| 292 } | 292 } |
| OLD | NEW |