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

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

Issue 2733943003: Reland of "Added large room scenario to full-stack tests (Closed)
Patch Set: Implemented Kjellander@ comments. Created 3 years, 9 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/full_stack_tests.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 FakeNetworkPipe::Config pipe; 71 FakeNetworkPipe::Config pipe;
72 bool logs; 72 bool logs;
73 struct { // Spatial scalability. 73 struct { // Spatial scalability.
74 std::vector<VideoStream> streams; // If empty, one stream is assumed. 74 std::vector<VideoStream> streams; // If empty, one stream is assumed.
75 size_t selected_stream; 75 size_t selected_stream;
76 int num_spatial_layers; 76 int num_spatial_layers;
77 int selected_sl; 77 int selected_sl;
78 // If empty, bitrates are generated in VP9Impl automatically. 78 // If empty, bitrates are generated in VP9Impl automatically.
79 std::vector<SpatialLayer> spatial_layers; 79 std::vector<SpatialLayer> spatial_layers;
80 } ss; 80 } ss;
81 int num_thumbnails;
81 }; 82 };
82 // (*) Set to -1.1 if generating graph data for simulcast or SVC and the
83 // selected stream/layer doesn't have the same resolution as the largest
84 // stream/layer (to ignore the PSNR and SSIM calculation errors).
85 83
86 VideoQualityTest(); 84 VideoQualityTest();
87 void RunWithAnalyzer(const Params& params); 85 void RunWithAnalyzer(const Params& params);
88 void RunWithRenderers(const Params& params); 86 void RunWithRenderers(const Params& params);
89 87
90 static void FillScalabilitySettings( 88 static void FillScalabilitySettings(
91 Params* params, 89 Params* params,
92 const std::vector<std::string>& stream_descriptors, 90 const std::vector<std::string>& stream_descriptors,
93 size_t selected_stream, 91 size_t selected_stream,
94 int num_spatial_layers, 92 int num_spatial_layers,
95 int selected_sl, 93 int selected_sl,
96 const std::vector<std::string>& sl_descriptors); 94 const std::vector<std::string>& sl_descriptors);
97 95
98 protected: 96 protected:
99 // No-op implementation to be able to instantiate this class from non-TEST_F 97 // No-op implementation to be able to instantiate this class from non-TEST_F
100 // locations. 98 // locations.
101 void TestBody() override; 99 void TestBody() override;
102 100
103 // Helper methods accessing only params_. 101 // Helper methods accessing only params_.
104 std::string GenerateGraphTitle() const; 102 std::string GenerateGraphTitle() const;
105 void CheckParams(); 103 void CheckParams();
106 104
107 // Helper static methods. 105 // Helper static methods.
108 static VideoStream DefaultVideoStream(const Params& params); 106 static VideoStream DefaultVideoStream(const Params& params);
107 static VideoStream DefaultThumbnailStream();
109 static std::vector<int> ParseCSV(const std::string& str); 108 static std::vector<int> ParseCSV(const std::string& str);
110 109
111 // Helper methods for setting up the call. 110 // Helper methods for setting up the call.
112 void CreateCapturer(); 111 void CreateCapturer();
112 void SetupThumbnailCapturers(size_t num_thumbnail_streams);
113 void SetupVideo(Transport* send_transport, Transport* recv_transport); 113 void SetupVideo(Transport* send_transport, Transport* recv_transport);
114 void SetupThumbnails(Transport* send_transport, Transport* recv_transport);
115 void DestroyThumbnailStreams();
114 void SetupScreenshareOrSVC(); 116 void SetupScreenshareOrSVC();
115 void SetupAudio(int send_channel_id, 117 void SetupAudio(int send_channel_id,
116 int receive_channel_id, 118 int receive_channel_id,
117 Call* call, 119 Call* call,
118 Transport* transport, 120 Transport* transport,
119 AudioReceiveStream** audio_receive_stream); 121 AudioReceiveStream** audio_receive_stream);
120 122
121 void StartEncodedFrameLogs(VideoSendStream* stream); 123 void StartEncodedFrameLogs(VideoSendStream* stream);
122 void StartEncodedFrameLogs(VideoReceiveStream* stream); 124 void StartEncodedFrameLogs(VideoReceiveStream* stream);
123 125
124 // We need a more general capturer than the FrameGeneratorCapturer. 126 // We need a more general capturer than the FrameGeneratorCapturer.
125 std::unique_ptr<test::VideoCapturer> video_capturer_; 127 std::unique_ptr<test::VideoCapturer> video_capturer_;
128 std::vector<std::unique_ptr<test::VideoCapturer>> thumbnail_capturers_;
126 std::unique_ptr<test::TraceToStderr> trace_to_stderr_; 129 std::unique_ptr<test::TraceToStderr> trace_to_stderr_;
127 std::unique_ptr<test::FrameGenerator> frame_generator_; 130 std::unique_ptr<test::FrameGenerator> frame_generator_;
128 std::unique_ptr<VideoEncoder> video_encoder_; 131 std::unique_ptr<VideoEncoder> video_encoder_;
132 std::vector<std::unique_ptr<VideoEncoder>> thumbnail_encoders_;
133 std::vector<VideoSendStream::Config> thumbnail_send_configs_;
134 std::vector<VideoEncoderConfig> thumbnail_encoder_configs_;
135 std::vector<VideoSendStream*> thumbnail_send_streams_;
136 std::vector<VideoReceiveStream::Config> thumbnail_receive_configs_;
137 std::vector<VideoReceiveStream*> thumbnail_receive_streams_;
138
129 Clock* const clock_; 139 Clock* const clock_;
130 140
131 int receive_logs_; 141 int receive_logs_;
132 int send_logs_; 142 int send_logs_;
133 143
134 VideoSendStream::DegradationPreference degradation_preference_ = 144 VideoSendStream::DegradationPreference degradation_preference_ =
135 VideoSendStream::DegradationPreference::kBalanced; 145 VideoSendStream::DegradationPreference::kBalanced;
136 Params params_; 146 Params params_;
137 }; 147 };
138 148
139 } // namespace webrtc 149 } // namespace webrtc
140 150
141 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_ 151 #endif // WEBRTC_VIDEO_VIDEO_QUALITY_TEST_H_
OLDNEW
« no previous file with comments | « webrtc/video/full_stack_tests.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698