| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Simulate end to end streaming. | 5 // Simulate end to end streaming. |
| 6 // | 6 // |
| 7 // Input: | 7 // Input: |
| 8 // --source= | 8 // --source= |
| 9 // WebM used as the source of video and audio frames. | 9 // WebM used as the source of video and audio frames. |
| 10 // --output= | 10 // --output= |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 it->rtp_timestamp, | 97 it->rtp_timestamp, |
| 98 it->frame_id, | 98 it->frame_id, |
| 99 it->packet_id, | 99 it->packet_id, |
| 100 it->max_packet_id, | 100 it->max_packet_id, |
| 101 it->size); | 101 it->size); |
| 102 } | 102 } |
| 103 for (std::vector<media::cast::FrameEvent>::const_iterator it = | 103 for (std::vector<media::cast::FrameEvent>::const_iterator it = |
| 104 frame_events.begin(); | 104 frame_events.begin(); |
| 105 it != frame_events.end(); | 105 it != frame_events.end(); |
| 106 ++it) { | 106 ++it) { |
| 107 if (it->type == FRAME_PLAYOUT) { | 107 env->Logging()->InsertFrameEvent(it->timestamp, |
| 108 env->Logging()->InsertFrameEventWithDelay( | 108 it->type, |
| 109 it->timestamp, | 109 it->media_type, |
| 110 it->type, | 110 it->rtp_timestamp, |
| 111 it->media_type, | 111 it->frame_id); |
| 112 it->rtp_timestamp, | |
| 113 it->frame_id, | |
| 114 it->delay_delta); | |
| 115 } else { | |
| 116 env->Logging()->InsertFrameEvent( | |
| 117 it->timestamp, | |
| 118 it->type, | |
| 119 it->media_type, | |
| 120 it->rtp_timestamp, | |
| 121 it->frame_id); | |
| 122 } | |
| 123 } | 112 } |
| 124 } | 113 } |
| 125 | 114 |
| 126 void GotVideoFrame( | 115 void GotVideoFrame( |
| 127 int* counter, | 116 int* counter, |
| 128 CastReceiver* cast_receiver, | 117 CastReceiver* cast_receiver, |
| 129 const scoped_refptr<media::VideoFrame>& video_frame, | 118 const scoped_refptr<media::VideoFrame>& video_frame, |
| 130 const base::TimeTicks& render_time, | 119 const base::TimeTicks& render_time, |
| 131 bool continuous) { | 120 bool continuous) { |
| 132 ++*counter; | 121 ++*counter; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 values.SetBoolean("sim", true); | 447 values.SetBoolean("sim", true); |
| 459 values.SetString("sim-id", sim_id); | 448 values.SetString("sim-id", sim_id); |
| 460 | 449 |
| 461 std::string extra_data; | 450 std::string extra_data; |
| 462 base::JSONWriter::Write(&values, &extra_data); | 451 base::JSONWriter::Write(&values, &extra_data); |
| 463 | 452 |
| 464 // Run. | 453 // Run. |
| 465 media::cast::RunSimulation(source_path, output_path, extra_data, model); | 454 media::cast::RunSimulation(source_path, output_path, extra_data, model); |
| 466 return 0; | 455 return 0; |
| 467 } | 456 } |
| OLD | NEW |