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())); | |
360 cast_environment->Logging()->AddRawEventSubscriber(offset_estimator.get()); | 359 cast_environment->Logging()->AddRawEventSubscriber(offset_estimator.get()); |
361 scoped_ptr<media::cast::StatsEventSubscriber> video_stats_subscriber( | 360 scoped_ptr<media::cast::StatsEventSubscriber> video_stats_subscriber( |
362 new media::cast::StatsEventSubscriber(media::cast::VIDEO_EVENT, | 361 new media::cast::StatsEventSubscriber(media::cast::VIDEO_EVENT, |
363 cast_environment->Clock(), | 362 cast_environment->Clock(), |
364 offset_estimator.get())); | 363 offset_estimator.get())); |
365 scoped_ptr<media::cast::StatsEventSubscriber> audio_stats_subscriber( | 364 scoped_ptr<media::cast::StatsEventSubscriber> audio_stats_subscriber( |
366 new media::cast::StatsEventSubscriber(media::cast::AUDIO_EVENT, | 365 new media::cast::StatsEventSubscriber(media::cast::AUDIO_EVENT, |
367 cast_environment->Clock(), | 366 cast_environment->Clock(), |
368 offset_estimator.get())); | 367 offset_estimator.get())); |
369 cast_environment->Logging()->AddRawEventSubscriber( | 368 cast_environment->Logging()->AddRawEventSubscriber( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 base::Passed(&audio_stats_subscriber), | 401 base::Passed(&audio_stats_subscriber), |
403 base::Passed(&offset_estimator)), | 402 base::Passed(&offset_estimator)), |
404 base::TimeDelta::FromSeconds(logging_duration_seconds)); | 403 base::TimeDelta::FromSeconds(logging_duration_seconds)); |
405 | 404 |
406 fake_media_source->Start(cast_sender->audio_frame_input(), | 405 fake_media_source->Start(cast_sender->audio_frame_input(), |
407 cast_sender->video_frame_input()); | 406 cast_sender->video_frame_input()); |
408 | 407 |
409 io_message_loop.Run(); | 408 io_message_loop.Run(); |
410 return 0; | 409 return 0; |
411 } | 410 } |
OLD | NEW |