Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Side by Side Diff: webrtc/video/video_quality_test.h

Issue 2312613003: Separating video settings in VideoQualityTest. (Closed)
Patch Set: on Stefan's comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/video_loopback.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
31 size_t width; 36 size_t width;
32 size_t height; 37 size_t height;
33 int32_t fps; 38 int32_t fps;
34 int min_bitrate_bps; 39 int min_bitrate_bps;
35 int target_bitrate_bps; 40 int target_bitrate_bps;
36 int max_bitrate_bps; 41 int max_bitrate_bps;
37 bool suspend_below_min_bitrate; 42 bool suspend_below_min_bitrate;
38 std::string codec; 43 std::string codec;
39 int num_temporal_layers; 44 int num_temporal_layers;
40 int selected_tl; 45 int selected_tl;
41 int min_transmit_bps; 46 int min_transmit_bps;
42 bool send_side_bwe;
43 bool fec; 47 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 { // Screenshare-specific settings. 50 struct {
51 bool enabled;
52 bool sync_video;
53 } audio;
54 struct {
51 bool enabled; 55 bool enabled;
52 int32_t slide_change_interval; 56 int32_t slide_change_interval;
53 int32_t scroll_duration; 57 int32_t scroll_duration;
54 } screenshare; 58 } screenshare;
55 struct { // Analyzer settings. 59 struct {
56 std::string test_label; 60 std::string test_label;
57 double avg_psnr_threshold; // (*) 61 double avg_psnr_threshold; // (*)
58 double avg_ssim_threshold; // (*) 62 double avg_ssim_threshold; // (*)
59 int test_durations_secs; 63 int test_durations_secs;
60 std::string graph_data_output_filename; 64 std::string graph_data_output_filename;
61 std::string graph_title; 65 std::string graph_title;
62 } analyzer; 66 } analyzer;
63 FakeNetworkPipe::Config pipe; 67 FakeNetworkPipe::Config pipe;
64 bool logs; 68 bool logs;
65 struct { // Spatial scalability. 69 struct { // Spatial scalability.
66 std::vector<VideoStream> streams; // If empty, one stream is assumed. 70 std::vector<VideoStream> streams; // If empty, one stream is assumed.
67 size_t selected_stream; 71 size_t selected_stream;
68 int num_spatial_layers; 72 int num_spatial_layers;
69 int selected_sl; 73 int selected_sl;
70 // If empty, bitrates are generated in VP9Impl automatically. 74 // If empty, bitrates are generated in VP9Impl automatically.
71 std::vector<SpatialLayer> spatial_layers; 75 std::vector<SpatialLayer> spatial_layers;
72 } ss; 76 } ss;
73 bool audio;
74 bool audio_video_sync;
75 }; 77 };
76 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the 78 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the
77 // selected stream/layer doesn't have the same resolution as the largest 79 // selected stream/layer doesn't have the same resolution as the largest
78 // stream/layer (to ignore the PSNR and SSIM calculation errors). 80 // stream/layer (to ignore the PSNR and SSIM calculation errors).
79 81
80 VideoQualityTest(); 82 VideoQualityTest();
81 void RunWithAnalyzer(const Params& params); 83 void RunWithAnalyzer(const Params& params);
82 void RunWithRenderers(const Params& params); 84 void RunWithRenderers(const Params& params);
83 85
84 static void FillScalabilitySettings( 86 static void FillScalabilitySettings(
(...skipping 29 matching lines...) Expand all
114 std::unique_ptr<VideoEncoder> encoder_; 116 std::unique_ptr<VideoEncoder> encoder_;
115 VideoCodecUnion codec_settings_; 117 VideoCodecUnion codec_settings_;
116 Clock* const clock_; 118 Clock* const clock_;
117 119
118 Params params_; 120 Params params_;
119 }; 121 };
120 122
121 } // namespace webrtc 123 } // namespace webrtc
122 124
123 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ 125 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_loopback.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698