| 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 std::string sim_id = cmd->GetSwitchValueASCII(media::cast::kSimulationId); | 759 std::string sim_id = cmd->GetSwitchValueASCII(media::cast::kSimulationId); |
| 760 | 760 |
| 761 NetworkSimulationModel model = media::cast::LoadModel( | 761 NetworkSimulationModel model = media::cast::LoadModel( |
| 762 cmd->GetSwitchValuePath(media::cast::kModelPath)); | 762 cmd->GetSwitchValuePath(media::cast::kModelPath)); |
| 763 | 763 |
| 764 base::DictionaryValue values; | 764 base::DictionaryValue values; |
| 765 values.SetBoolean("sim", true); | 765 values.SetBoolean("sim", true); |
| 766 values.SetString("sim-id", sim_id); | 766 values.SetString("sim-id", sim_id); |
| 767 | 767 |
| 768 std::string extra_data; | 768 std::string extra_data; |
| 769 base::JSONWriter::Write(&values, &extra_data); | 769 base::JSONWriter::Write(values, &extra_data); |
| 770 | 770 |
| 771 // Run. | 771 // Run. |
| 772 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, | 772 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, |
| 773 yuv_output_path, extra_data, model); | 773 yuv_output_path, extra_data, model); |
| 774 return 0; | 774 return 0; |
| 775 } | 775 } |
| OLD | NEW |