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 16 matching lines...) Expand all Loading... |
27 // decoded frames. Assumes all encoded frames are decoded. | 27 // decoded frames. Assumes all encoded frames are decoded. |
28 // --yuv-output= | 28 // --yuv-output= |
29 // File path to write YUV decoded frames in YUV4MPEG2 format. | 29 // File path to write YUV decoded frames in YUV4MPEG2 format. |
30 // --no-simulation | 30 // --no-simulation |
31 // Do not run network simulation. | 31 // Do not run network simulation. |
32 // | 32 // |
33 // Output: | 33 // Output: |
34 // - Raw event log of the simulation session tagged with the unique test ID, | 34 // - Raw event log of the simulation session tagged with the unique test ID, |
35 // written out to the specified file path. | 35 // written out to the specified file path. |
36 | 36 |
| 37 #include <stddef.h> |
| 38 #include <stdint.h> |
| 39 |
37 #include "base/at_exit.h" | 40 #include "base/at_exit.h" |
38 #include "base/base_paths.h" | 41 #include "base/base_paths.h" |
39 #include "base/command_line.h" | 42 #include "base/command_line.h" |
40 #include "base/files/file_path.h" | 43 #include "base/files/file_path.h" |
41 #include "base/files/file_util.h" | 44 #include "base/files/file_util.h" |
42 #include "base/files/memory_mapped_file.h" | 45 #include "base/files/memory_mapped_file.h" |
43 #include "base/files/scoped_file.h" | 46 #include "base/files/scoped_file.h" |
44 #include "base/json/json_writer.h" | 47 #include "base/json/json_writer.h" |
45 #include "base/logging.h" | 48 #include "base/logging.h" |
| 49 #include "base/macros.h" |
46 #include "base/path_service.h" | 50 #include "base/path_service.h" |
47 #include "base/strings/string_number_conversions.h" | 51 #include "base/strings/string_number_conversions.h" |
48 #include "base/strings/stringprintf.h" | 52 #include "base/strings/stringprintf.h" |
49 #include "base/test/simple_test_tick_clock.h" | 53 #include "base/test/simple_test_tick_clock.h" |
50 #include "base/thread_task_runner_handle.h" | 54 #include "base/thread_task_runner_handle.h" |
51 #include "base/time/tick_clock.h" | 55 #include "base/time/tick_clock.h" |
52 #include "base/values.h" | 56 #include "base/values.h" |
53 #include "media/base/audio_bus.h" | 57 #include "media/base/audio_bus.h" |
54 #include "media/base/media.h" | 58 #include "media/base/media.h" |
55 #include "media/base/video_frame.h" | 59 #include "media/base/video_frame.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 values.SetString("sim-id", sim_id); | 726 values.SetString("sim-id", sim_id); |
723 | 727 |
724 std::string extra_data; | 728 std::string extra_data; |
725 base::JSONWriter::Write(values, &extra_data); | 729 base::JSONWriter::Write(values, &extra_data); |
726 | 730 |
727 // Run. | 731 // Run. |
728 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, | 732 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, |
729 yuv_output_path, extra_data, model); | 733 yuv_output_path, extra_data, model); |
730 return 0; | 734 return 0; |
731 } | 735 } |
OLD | NEW |