OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #ifndef WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ | 10 #ifndef WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class VideoQualityTest : public test::CallTest { | 23 class VideoQualityTest : public test::CallTest { |
24 public: | 24 public: |
25 // Parameters are grouped into smaller structs to make it easier to set | 25 // Parameters are grouped into smaller structs to make it easier to set |
26 // the desired elements and skip unused, using aggregate initialization. | 26 // the desired elements and skip unused, using aggregate initialization. |
27 // Unfortunately, C++11 (as opposed to C11) doesn't support unnamed structs, | 27 // Unfortunately, C++11 (as opposed to C11) doesn't support unnamed structs, |
28 // which makes the implementation of VideoQualityTest a bit uglier. | 28 // which makes the implementation of VideoQualityTest a bit uglier. |
29 struct Params { | 29 struct Params { |
30 struct { | 30 struct { |
31 bool send_side_bwe; | |
32 Call::Config::BitrateConfig call_bitrate_config; | |
33 } call; | |
34 struct { | |
35 bool enabled; | |
36 size_t width; | 31 size_t width; |
37 size_t height; | 32 size_t height; |
38 int32_t fps; | 33 int32_t fps; |
39 int min_bitrate_bps; | 34 int min_bitrate_bps; |
40 int target_bitrate_bps; | 35 int target_bitrate_bps; |
41 int max_bitrate_bps; | 36 int max_bitrate_bps; |
42 bool suspend_below_min_bitrate; | 37 bool suspend_below_min_bitrate; |
43 std::string codec; | 38 std::string codec; |
44 int num_temporal_layers; | 39 int num_temporal_layers; |
45 int selected_tl; | 40 int selected_tl; |
46 int min_transmit_bps; | 41 int min_transmit_bps; |
| 42 bool send_side_bwe; |
47 bool fec; | 43 bool fec; |
| 44 |
| 45 Call::Config::BitrateConfig call_bitrate_config; |
| 46 } common; |
| 47 struct { // Video-specific settings. |
48 std::string clip_name; | 48 std::string clip_name; |
49 } video; | 49 } video; |
50 struct { | 50 struct { // Screenshare-specific settings. |
51 bool enabled; | |
52 bool sync_video; | |
53 } audio; | |
54 struct { | |
55 bool enabled; | 51 bool enabled; |
56 int32_t slide_change_interval; | 52 int32_t slide_change_interval; |
57 int32_t scroll_duration; | 53 int32_t scroll_duration; |
58 } screenshare; | 54 } screenshare; |
59 struct { | 55 struct { // Analyzer settings. |
60 std::string test_label; | 56 std::string test_label; |
61 double avg_psnr_threshold; // (*) | 57 double avg_psnr_threshold; // (*) |
62 double avg_ssim_threshold; // (*) | 58 double avg_ssim_threshold; // (*) |
63 int test_durations_secs; | 59 int test_durations_secs; |
64 std::string graph_data_output_filename; | 60 std::string graph_data_output_filename; |
65 std::string graph_title; | 61 std::string graph_title; |
66 } analyzer; | 62 } analyzer; |
67 FakeNetworkPipe::Config pipe; | 63 FakeNetworkPipe::Config pipe; |
68 bool logs; | 64 bool logs; |
69 struct { // Spatial scalability. | 65 struct { // Spatial scalability. |
70 std::vector<VideoStream> streams; // If empty, one stream is assumed. | 66 std::vector<VideoStream> streams; // If empty, one stream is assumed. |
71 size_t selected_stream; | 67 size_t selected_stream; |
72 int num_spatial_layers; | 68 int num_spatial_layers; |
73 int selected_sl; | 69 int selected_sl; |
74 // If empty, bitrates are generated in VP9Impl automatically. | 70 // If empty, bitrates are generated in VP9Impl automatically. |
75 std::vector<SpatialLayer> spatial_layers; | 71 std::vector<SpatialLayer> spatial_layers; |
76 } ss; | 72 } ss; |
| 73 bool audio; |
| 74 bool audio_video_sync; |
77 }; | 75 }; |
78 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the | 76 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the |
79 // selected stream/layer doesn't have the same resolution as the largest | 77 // selected stream/layer doesn't have the same resolution as the largest |
80 // stream/layer (to ignore the PSNR and SSIM calculation errors). | 78 // stream/layer (to ignore the PSNR and SSIM calculation errors). |
81 | 79 |
82 VideoQualityTest(); | 80 VideoQualityTest(); |
83 void RunWithAnalyzer(const Params& params); | 81 void RunWithAnalyzer(const Params& params); |
84 void RunWithRenderers(const Params& params); | 82 void RunWithRenderers(const Params& params); |
85 | 83 |
86 static void FillScalabilitySettings( | 84 static void FillScalabilitySettings( |
(...skipping 29 matching lines...) Expand all Loading... |
116 std::unique_ptr<VideoEncoder> encoder_; | 114 std::unique_ptr<VideoEncoder> encoder_; |
117 VideoCodecUnion codec_settings_; | 115 VideoCodecUnion codec_settings_; |
118 Clock* const clock_; | 116 Clock* const clock_; |
119 | 117 |
120 Params params_; | 118 Params params_; |
121 }; | 119 }; |
122 | 120 |
123 } // namespace webrtc | 121 } // namespace webrtc |
124 | 122 |
125 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ | 123 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ |
OLD | NEW |