| 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= |
| 11 // File path to writing out the raw event log of the simulation session. | 11 // File path to writing out the raw event log of the simulation session. |
| 12 // --sim-id= | 12 // --sim-id= |
| 13 // Unique simulation ID. | 13 // Unique simulation ID. |
| 14 // | 14 // |
| 15 // Output: | 15 // Output: |
| 16 // - Raw event log of the simulation session tagged with the unique test ID, | 16 // - Raw event log of the simulation session tagged with the unique test ID, |
| 17 // written out to the specified file path. | 17 // written out to the specified file path. |
| 18 | 18 |
| 19 #include "base/at_exit.h" | 19 #include "base/at_exit.h" |
| 20 #include "base/base_paths.h" | 20 #include "base/base_paths.h" |
| 21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
| 22 #include "base/file_util.h" | |
| 23 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
| 23 #include "base/files/file_util.h" |
| 24 #include "base/files/memory_mapped_file.h" | 24 #include "base/files/memory_mapped_file.h" |
| 25 #include "base/files/scoped_file.h" | 25 #include "base/files/scoped_file.h" |
| 26 #include "base/json/json_writer.h" | 26 #include "base/json/json_writer.h" |
| 27 #include "base/logging.h" | 27 #include "base/logging.h" |
| 28 #include "base/path_service.h" | 28 #include "base/path_service.h" |
| 29 #include "base/test/simple_test_tick_clock.h" | 29 #include "base/test/simple_test_tick_clock.h" |
| 30 #include "base/thread_task_runner_handle.h" | 30 #include "base/thread_task_runner_handle.h" |
| 31 #include "base/time/tick_clock.h" | 31 #include "base/time/tick_clock.h" |
| 32 #include "base/values.h" | 32 #include "base/values.h" |
| 33 #include "media/base/audio_bus.h" | 33 #include "media/base/audio_bus.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 values.SetBoolean("sim", true); | 513 values.SetBoolean("sim", true); |
| 514 values.SetString("sim-id", sim_id); | 514 values.SetString("sim-id", sim_id); |
| 515 | 515 |
| 516 std::string extra_data; | 516 std::string extra_data; |
| 517 base::JSONWriter::Write(&values, &extra_data); | 517 base::JSONWriter::Write(&values, &extra_data); |
| 518 | 518 |
| 519 // Run. | 519 // Run. |
| 520 media::cast::RunSimulation(source_path, output_path, extra_data, model); | 520 media::cast::RunSimulation(source_path, output_path, extra_data, model); |
| 521 return 0; | 521 return 0; |
| 522 } | 522 } |
| OLD | NEW |