| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 net::IPEndPoint remote_end_point(remote_ip_number, remote_port); | 281 net::IPEndPoint remote_end_point(remote_ip_number, remote_port); |
| 282 net::IPEndPoint local_end_point(local_ip_number, local_port); | 282 net::IPEndPoint local_end_point(local_ip_number, local_port); |
| 283 | 283 |
| 284 scoped_ptr<media::cast::transport::UdpTransport> transport( | 284 scoped_ptr<media::cast::transport::UdpTransport> transport( |
| 285 new media::cast::transport::UdpTransport( | 285 new media::cast::transport::UdpTransport( |
| 286 NULL, | 286 NULL, |
| 287 main_message_loop.message_loop_proxy(), | 287 main_message_loop.message_loop_proxy(), |
| 288 local_end_point, | 288 local_end_point, |
| 289 remote_end_point, | 289 remote_end_point, |
| 290 base::Bind(&media::cast::UpdateCastTransportStatus))); | 290 base::Bind(&media::cast::UpdateCastTransportStatus))); |
| 291 scoped_ptr<media::cast::CastReceiver> cast_receiver( | 291 scoped_ptr<media::cast::CastReceiver> cast_receiver = |
| 292 media::cast::CastReceiver::CreateCastReceiver( | 292 media::cast::CastReceiver::Create( |
| 293 cast_environment, audio_config, video_config, transport.get())); | 293 cast_environment, audio_config, video_config, transport.get()); |
| 294 | 294 |
| 295 // TODO(hubbe): Make the cast receiver do this automatically. | 295 // TODO(hubbe): Make the cast receiver do this automatically. |
| 296 transport->StartReceiving(cast_receiver->packet_receiver()); | 296 transport->StartReceiving(cast_receiver->packet_receiver()); |
| 297 | 297 |
| 298 scoped_refptr<media::cast::ReceiveProcess> receive_process( | 298 scoped_refptr<media::cast::ReceiveProcess> receive_process( |
| 299 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); | 299 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); |
| 300 receive_process->Start(); | 300 receive_process->Start(); |
| 301 main_message_loop.Run(); | 301 main_message_loop.Run(); |
| 302 return 0; | 302 return 0; |
| 303 } | 303 } |
| OLD | NEW |