Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: media/cast/test/receiver.cc

Issue 163553006: Cast: Refactoring Cast API's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactoring and responding to review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 net::IPEndPoint remote_end_point(remote_ip_number, remote_port); 276 net::IPEndPoint remote_end_point(remote_ip_number, remote_port);
277 net::IPEndPoint local_end_point(local_ip_number, local_port); 277 net::IPEndPoint local_end_point(local_ip_number, local_port);
278 278
279 scoped_ptr<media::cast::transport::UdpTransport> transport( 279 scoped_ptr<media::cast::transport::UdpTransport> transport(
280 new media::cast::transport::UdpTransport( 280 new media::cast::transport::UdpTransport(
281 main_message_loop.message_loop_proxy(), 281 main_message_loop.message_loop_proxy(),
282 local_end_point, 282 local_end_point,
283 remote_end_point, 283 remote_end_point,
284 base::Bind(&media::cast::UpdateCastTransportStatus))); 284 base::Bind(&media::cast::UpdateCastTransportStatus)));
285 scoped_ptr<media::cast::CastReceiver> cast_receiver( 285 scoped_ptr<media::cast::CastReceiver> cast_receiver =
286 media::cast::CastReceiver::CreateCastReceiver( 286 media::cast::CastReceiver::Create(
287 cast_environment, audio_config, video_config, transport.get())); 287 cast_environment, audio_config, video_config, transport.get());
288 288
289 // TODO(hubbe): Make the cast receiver do this automatically. 289 // TODO(hubbe): Make the cast receiver do this automatically.
290 transport->StartReceiving(cast_receiver->packet_receiver()); 290 transport->StartReceiving(cast_receiver->packet_receiver());
291 291
292 scoped_refptr<media::cast::ReceiveProcess> receive_process( 292 scoped_refptr<media::cast::ReceiveProcess> receive_process(
293 new media::cast::ReceiveProcess(cast_receiver->frame_receiver())); 293 new media::cast::ReceiveProcess(cast_receiver->frame_receiver()));
294 receive_process->Start(); 294 receive_process->Start();
295 main_message_loop.Run(); 295 main_message_loop.Run();
296 return 0; 296 return 0;
297 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698