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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 void LogRawEvents( | 751 void LogRawEvents( |
752 const scoped_refptr<media::cast::CastEnvironment>& cast_environment, | 752 const scoped_refptr<media::cast::CastEnvironment>& cast_environment, |
753 const std::vector<media::cast::PacketEvent>& packet_events) { | 753 const std::vector<media::cast::PacketEvent>& packet_events) { |
754 VLOG(1) << "Got packet events from transport, size: " << packet_events.size(); | 754 VLOG(1) << "Got packet events from transport, size: " << packet_events.size(); |
755 for (std::vector<media::cast::PacketEvent>::const_iterator it = | 755 for (std::vector<media::cast::PacketEvent>::const_iterator it = |
756 packet_events.begin(); | 756 packet_events.begin(); |
757 it != packet_events.end(); | 757 it != packet_events.end(); |
758 ++it) { | 758 ++it) { |
759 cast_environment->Logging()->InsertPacketEvent(it->timestamp, | 759 cast_environment->Logging()->InsertPacketEvent(it->timestamp, |
760 it->type, | 760 it->type, |
| 761 it->media_type, |
761 it->rtp_timestamp, | 762 it->rtp_timestamp, |
762 it->frame_id, | 763 it->frame_id, |
763 it->packet_id, | 764 it->packet_id, |
764 it->max_packet_id, | 765 it->max_packet_id, |
765 it->size); | 766 it->size); |
766 } | 767 } |
767 } | 768 } |
768 | 769 |
769 void InitializationResult(media::cast::CastInitializationStatus result) { | 770 void InitializationResult(media::cast::CastInitializationStatus result) { |
770 bool end_result = result == media::cast::STATUS_AUDIO_INITIALIZED || | 771 bool end_result = result == media::cast::STATUS_AUDIO_INITIALIZED || |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 base::Passed(&audio_stats_subscriber), | 1011 base::Passed(&audio_stats_subscriber), |
1011 base::Passed(&offset_estimator)), | 1012 base::Passed(&offset_estimator)), |
1012 base::TimeDelta::FromSeconds(logging_duration_seconds)); | 1013 base::TimeDelta::FromSeconds(logging_duration_seconds)); |
1013 | 1014 |
1014 send_process->Start(cast_sender->audio_frame_input(), | 1015 send_process->Start(cast_sender->audio_frame_input(), |
1015 cast_sender->video_frame_input()); | 1016 cast_sender->video_frame_input()); |
1016 | 1017 |
1017 io_message_loop.Run(); | 1018 io_message_loop.Run(); |
1018 return 0; | 1019 return 0; |
1019 } | 1020 } |
OLD | NEW |