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