| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 media::cast::VIDEO_EVENT, 10000)); | 348 media::cast::VIDEO_EVENT, 10000)); |
| 349 audio_event_subscriber.reset(new media::cast::EncodingEventSubscriber( | 349 audio_event_subscriber.reset(new media::cast::EncodingEventSubscriber( |
| 350 media::cast::AUDIO_EVENT, 10000)); | 350 media::cast::AUDIO_EVENT, 10000)); |
| 351 cast_environment->Logging()->AddRawEventSubscriber( | 351 cast_environment->Logging()->AddRawEventSubscriber( |
| 352 video_event_subscriber.get()); | 352 video_event_subscriber.get()); |
| 353 cast_environment->Logging()->AddRawEventSubscriber( | 353 cast_environment->Logging()->AddRawEventSubscriber( |
| 354 audio_event_subscriber.get()); | 354 audio_event_subscriber.get()); |
| 355 | 355 |
| 356 // Subscribers for stats. | 356 // Subscribers for stats. |
| 357 scoped_ptr<media::cast::ReceiverTimeOffsetEstimatorImpl> offset_estimator( | 357 scoped_ptr<media::cast::ReceiverTimeOffsetEstimatorImpl> offset_estimator( |
| 358 new media::cast::ReceiverTimeOffsetEstimatorImpl); | 358 new media::cast::ReceiverTimeOffsetEstimatorImpl( |
| 359 cast_environment->Clock())); |
| 359 cast_environment->Logging()->AddRawEventSubscriber(offset_estimator.get()); | 360 cast_environment->Logging()->AddRawEventSubscriber(offset_estimator.get()); |
| 360 scoped_ptr<media::cast::StatsEventSubscriber> video_stats_subscriber( | 361 scoped_ptr<media::cast::StatsEventSubscriber> video_stats_subscriber( |
| 361 new media::cast::StatsEventSubscriber(media::cast::VIDEO_EVENT, | 362 new media::cast::StatsEventSubscriber(media::cast::VIDEO_EVENT, |
| 362 cast_environment->Clock(), | 363 cast_environment->Clock(), |
| 363 offset_estimator.get())); | 364 offset_estimator.get())); |
| 364 scoped_ptr<media::cast::StatsEventSubscriber> audio_stats_subscriber( | 365 scoped_ptr<media::cast::StatsEventSubscriber> audio_stats_subscriber( |
| 365 new media::cast::StatsEventSubscriber(media::cast::AUDIO_EVENT, | 366 new media::cast::StatsEventSubscriber(media::cast::AUDIO_EVENT, |
| 366 cast_environment->Clock(), | 367 cast_environment->Clock(), |
| 367 offset_estimator.get())); | 368 offset_estimator.get())); |
| 368 cast_environment->Logging()->AddRawEventSubscriber( | 369 cast_environment->Logging()->AddRawEventSubscriber( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 base::Passed(&audio_stats_subscriber), | 402 base::Passed(&audio_stats_subscriber), |
| 402 base::Passed(&offset_estimator)), | 403 base::Passed(&offset_estimator)), |
| 403 base::TimeDelta::FromSeconds(logging_duration_seconds)); | 404 base::TimeDelta::FromSeconds(logging_duration_seconds)); |
| 404 | 405 |
| 405 fake_media_source->Start(cast_sender->audio_frame_input(), | 406 fake_media_source->Start(cast_sender->audio_frame_input(), |
| 406 cast_sender->video_frame_input()); | 407 cast_sender->video_frame_input()); |
| 407 | 408 |
| 408 io_message_loop.Run(); | 409 io_message_loop.Run(); |
| 409 return 0; | 410 return 0; |
| 410 } | 411 } |
| OLD | NEW |