| 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 env->Logging()->InsertFrameEvent(it->timestamp, | 107 if (it->type == FRAME_PLAYOUT) { |
| 108 it->type, | 108 env->Logging()->InsertFrameEventWithDelay( |
| 109 it->media_type, | 109 it->timestamp, |
| 110 it->rtp_timestamp, | 110 it->type, |
| 111 it->frame_id); | 111 it->media_type, |
| 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 } |
| 112 } | 123 } |
| 113 } | 124 } |
| 114 | 125 |
| 115 void GotVideoFrame( | 126 void GotVideoFrame( |
| 116 int* counter, | 127 int* counter, |
| 117 CastReceiver* cast_receiver, | 128 CastReceiver* cast_receiver, |
| 118 const scoped_refptr<media::VideoFrame>& video_frame, | 129 const scoped_refptr<media::VideoFrame>& video_frame, |
| 119 const base::TimeTicks& render_time, | 130 const base::TimeTicks& render_time, |
| 120 bool continuous) { | 131 bool continuous) { |
| 121 ++*counter; | 132 ++*counter; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 values.SetBoolean("sim", true); | 458 values.SetBoolean("sim", true); |
| 448 values.SetString("sim-id", sim_id); | 459 values.SetString("sim-id", sim_id); |
| 449 | 460 |
| 450 std::string extra_data; | 461 std::string extra_data; |
| 451 base::JSONWriter::Write(&values, &extra_data); | 462 base::JSONWriter::Write(&values, &extra_data); |
| 452 | 463 |
| 453 // Run. | 464 // Run. |
| 454 media::cast::RunSimulation(source_path, output_path, extra_data, model); | 465 media::cast::RunSimulation(source_path, output_path, extra_data, model); |
| 455 return 0; | 466 return 0; |
| 456 } | 467 } |
| OLD | NEW |