OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Exclude all keyframes from packet loss, no matter where in the video | 46 // Exclude all keyframes from packet loss, no matter where in the video |
47 // sequence they occur. | 47 // sequence they occur. |
48 kExcludeAllKeyFrames | 48 kExcludeAllKeyFrames |
49 }; | 49 }; |
50 | 50 |
51 // Returns a string representation of the enum value. | 51 // Returns a string representation of the enum value. |
52 const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e); | 52 const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e); |
53 | 53 |
54 // Test configuration for a test run. | 54 // Test configuration for a test run. |
55 struct TestConfig { | 55 struct TestConfig { |
56 // Name of the test. This is purely metadata and does not affect the test. | |
57 std::string name; | |
58 | |
59 // More detailed description of the test. This is purely metadata and does | |
60 // not affect the test. | |
61 std::string description; | |
62 | |
63 // Number of this test. Useful if multiple runs of the same test with | |
64 // different configurations shall be managed. | |
65 int test_number = 0; | |
66 | |
67 // Plain name of YUV file to process without file extension. | 56 // Plain name of YUV file to process without file extension. |
68 std::string filename; | 57 std::string filename; |
69 | 58 |
70 // File to process. This must be a video file in the YUV format. | 59 // File to process. This must be a video file in the YUV format. |
71 std::string input_filename; | 60 std::string input_filename; |
72 | 61 |
73 // File to write to during processing for the test. Will be a video file | 62 // File to write to during processing for the test. Will be a video file |
74 // in the YUV format. | 63 // in the YUV format. |
75 std::string output_filename; | 64 std::string output_filename; |
76 | 65 |
77 // Path to the directory where encoded files will be put | |
78 // (absolute or relative to the executable). | |
79 std::string output_dir = "out"; | |
80 | |
81 // Configurations related to networking. | 66 // Configurations related to networking. |
82 NetworkingConfig networking_config; | 67 NetworkingConfig networking_config; |
83 | 68 |
84 // Decides how the packet loss simulations shall exclude certain frames | 69 // Decides how the packet loss simulations shall exclude certain frames |
85 // from packet loss. | 70 // from packet loss. |
86 ExcludeFrameTypes exclude_frame_types = kExcludeOnlyFirstKeyFrame; | 71 ExcludeFrameTypes exclude_frame_types = kExcludeOnlyFirstKeyFrame; |
87 | 72 |
88 // The length of a single frame of the input video file. Calculated out of the | |
89 // width and height according to the video format specification (i.e. YUV). | |
90 size_t frame_length_in_bytes = 0; | |
91 | |
92 // Force the encoder and decoder to use a single core for processing. | 73 // Force the encoder and decoder to use a single core for processing. |
93 // Using a single core is necessary to get a deterministic behavior for the | 74 // Using a single core is necessary to get a deterministic behavior for the |
94 // encoded frames - using multiple cores will produce different encoded frames | 75 // encoded frames - using multiple cores will produce different encoded frames |
95 // since multiple cores are competing to consume the byte budget for each | 76 // since multiple cores are competing to consume the byte budget for each |
96 // frame in parallel. | 77 // frame in parallel. |
97 // If set to false, the maximum number of available cores will be used. | 78 // If set to false, the maximum number of available cores will be used. |
98 bool use_single_core = false; | 79 bool use_single_core = false; |
99 | 80 |
100 // If > 0: forces the encoder to create a keyframe every Nth frame. | 81 // If > 0: forces the encoder to create a keyframe every Nth frame. |
101 // Note that the encoder may create a keyframe in other locations in addition | 82 // Note that the encoder may create a keyframe in other locations in addition |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 310 |
330 rtc::SequencedTaskChecker sequence_checker_; | 311 rtc::SequencedTaskChecker sequence_checker_; |
331 | 312 |
332 RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor); | 313 RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor); |
333 }; | 314 }; |
334 | 315 |
335 } // namespace test | 316 } // namespace test |
336 } // namespace webrtc | 317 } // namespace webrtc |
337 | 318 |
338 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ | 319 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ |
OLD | NEW |