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 // Test application that simulates a cast sender - Data can be either generated | 5 // Test application that simulates a cast sender - Data can be either generated |
6 // or read from a file. | 6 // or read from a file. |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 LOG(INFO) << "Source: " << source_path.value(); | 315 LOG(INFO) << "Source: " << source_path.value(); |
316 fake_media_source->SetSourceFile(source_path, override_fps); | 316 fake_media_source->SetSourceFile(source_path, override_fps); |
317 } | 317 } |
318 | 318 |
319 // CastTransportSender initialization. | 319 // CastTransportSender initialization. |
320 scoped_ptr<media::cast::CastTransportSender> transport_sender = | 320 scoped_ptr<media::cast::CastTransportSender> transport_sender = |
321 media::cast::CastTransportSender::Create( | 321 media::cast::CastTransportSender::Create( |
322 NULL, // net log. | 322 NULL, // net log. |
323 cast_environment->Clock(), | 323 cast_environment->Clock(), |
324 remote_endpoint, | 324 remote_endpoint, |
| 325 make_scoped_ptr(new base::DictionaryValue), // options |
325 base::Bind(&UpdateCastTransportStatus), | 326 base::Bind(&UpdateCastTransportStatus), |
326 base::Bind(&LogRawEvents, cast_environment), | 327 base::Bind(&LogRawEvents, cast_environment), |
327 base::TimeDelta::FromSeconds(1), | 328 base::TimeDelta::FromSeconds(1), |
328 io_message_loop.message_loop_proxy()); | 329 io_message_loop.message_loop_proxy()); |
329 | 330 |
330 // CastSender initialization. | 331 // CastSender initialization. |
331 scoped_ptr<media::cast::CastSender> cast_sender = | 332 scoped_ptr<media::cast::CastSender> cast_sender = |
332 media::cast::CastSender::Create(cast_environment, transport_sender.get()); | 333 media::cast::CastSender::Create(cast_environment, transport_sender.get()); |
333 cast_sender->InitializeVideo( | 334 cast_sender->InitializeVideo( |
334 fake_media_source->get_video_config(), | 335 fake_media_source->get_video_config(), |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 base::Passed(&audio_stats_subscriber), | 403 base::Passed(&audio_stats_subscriber), |
403 base::Passed(&offset_estimator)), | 404 base::Passed(&offset_estimator)), |
404 base::TimeDelta::FromSeconds(logging_duration_seconds)); | 405 base::TimeDelta::FromSeconds(logging_duration_seconds)); |
405 | 406 |
406 fake_media_source->Start(cast_sender->audio_frame_input(), | 407 fake_media_source->Start(cast_sender->audio_frame_input(), |
407 cast_sender->video_frame_input()); | 408 cast_sender->video_frame_input()); |
408 | 409 |
409 io_message_loop.Run(); | 410 io_message_loop.Run(); |
410 return 0; | 411 return 0; |
411 } | 412 } |
OLD | NEW |