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

Side by Side Diff: webrtc/video/video_loopback.cc

Issue 2259783002: Reland of Adding audio to video_quality_test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fixing struct initialization. Created 4 years, 4 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/screenshare_loopback.cc ('k') | webrtc/video/video_quality_test.h » ('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 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 DEFINE_bool(logs, false, "print logs to stderr"); 186 DEFINE_bool(logs, false, "print logs to stderr");
187 187
188 DEFINE_bool(send_side_bwe, true, "Use send-side bandwidth estimation"); 188 DEFINE_bool(send_side_bwe, true, "Use send-side bandwidth estimation");
189 189
190 DEFINE_bool(allow_reordering, false, "Allow packet reordering to occur"); 190 DEFINE_bool(allow_reordering, false, "Allow packet reordering to occur");
191 191
192 DEFINE_bool(use_fec, false, "Use forward error correction."); 192 DEFINE_bool(use_fec, false, "Use forward error correction.");
193 193
194 DEFINE_bool(audio, false, "Add audio stream");
195
196 DEFINE_bool(audio_video_sync, false, "Sync audio and video stream (no effect if"
197 " audio is false)");
198
194 DEFINE_string( 199 DEFINE_string(
195 force_fieldtrials, 200 force_fieldtrials,
196 "", 201 "",
197 "Field trials control experimental feature code which can be forced. " 202 "Field trials control experimental feature code which can be forced. "
198 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" 203 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
199 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple " 204 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
200 "trials are separated by \"/\""); 205 "trials are separated by \"/\"");
201 206
202 // Video-specific flags. 207 // Video-specific flags.
203 DEFINE_string(clip, 208 DEFINE_string(clip,
(...skipping 13 matching lines...) Expand all
217 pipe_config.queue_length_packets = flags::QueueSize(); 222 pipe_config.queue_length_packets = flags::QueueSize();
218 pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs(); 223 pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs();
219 pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs(); 224 pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs();
220 pipe_config.allow_reordering = flags::FLAGS_allow_reordering; 225 pipe_config.allow_reordering = flags::FLAGS_allow_reordering;
221 226
222 Call::Config::BitrateConfig call_bitrate_config; 227 Call::Config::BitrateConfig call_bitrate_config;
223 call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000; 228 call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000;
224 call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000; 229 call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000;
225 call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000; 230 call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000;
226 231
227 VideoQualityTest::Params params{ 232 VideoQualityTest::Params params;
228 {flags::Width(), flags::Height(), flags::Fps(), 233 params.common = {flags::Width(), flags::Height(), flags::Fps(),
229 flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000, 234 flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000,
230 flags::MaxBitrateKbps() * 1000, flags::FLAGS_suspend_below_min_bitrate, 235 flags::MaxBitrateKbps() * 1000, flags::FLAGS_suspend_below_min_bitrate,
231 flags::Codec(), flags::NumTemporalLayers(), flags::SelectedTL(), 236 flags::Codec(), flags::NumTemporalLayers(), flags::SelectedTL(),
232 0, // No min transmit bitrate. 237 0, // No min transmit bitrate.
233 flags::FLAGS_send_side_bwe, flags::FLAGS_use_fec, call_bitrate_config}, 238 flags::FLAGS_send_side_bwe, flags::FLAGS_use_fec, call_bitrate_config};
234 {flags::Clip()}, 239 params.video = {flags::Clip()};
235 {}, // Screenshare specific. 240 params.analyzer = {"video", 0.0, 0.0, flags::DurationSecs(),
236 {"video", 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename(), 241 flags::OutputFilename(), flags::GraphTitle()};
237 flags::GraphTitle()}, 242 params.pipe = pipe_config;
238 pipe_config, 243 params.logs = flags::FLAGS_logs;
239 flags::FLAGS_logs}; 244 params.audio = flags::FLAGS_audio,
245 params.audio_video_sync = flags::FLAGS_audio_video_sync;
240 246
241 std::vector<std::string> stream_descriptors; 247 std::vector<std::string> stream_descriptors;
242 stream_descriptors.push_back(flags::Stream0()); 248 stream_descriptors.push_back(flags::Stream0());
243 stream_descriptors.push_back(flags::Stream1()); 249 stream_descriptors.push_back(flags::Stream1());
244 std::vector<std::string> SL_descriptors; 250 std::vector<std::string> SL_descriptors;
245 SL_descriptors.push_back(flags::SL0()); 251 SL_descriptors.push_back(flags::SL0());
246 SL_descriptors.push_back(flags::SL1()); 252 SL_descriptors.push_back(flags::SL1());
247 VideoQualityTest::FillScalabilitySettings( 253 VideoQualityTest::FillScalabilitySettings(
248 &params, stream_descriptors, flags::SelectedStream(), 254 &params, stream_descriptors, flags::SelectedStream(),
249 flags::NumSpatialLayers(), flags::SelectedSL(), SL_descriptors); 255 flags::NumSpatialLayers(), flags::SelectedSL(), SL_descriptors);
250 256
251 VideoQualityTest test; 257 VideoQualityTest test;
252 if (flags::DurationSecs()) { 258 if (flags::DurationSecs()) {
253 test.RunWithAnalyzer(params); 259 test.RunWithAnalyzer(params);
254 } else { 260 } else {
255 test.RunWithVideoRenderer(params); 261 test.RunWithRenderers(params);
256 } 262 }
257 } 263 }
258 } // namespace webrtc 264 } // namespace webrtc
259 265
260 int main(int argc, char* argv[]) { 266 int main(int argc, char* argv[]) {
261 ::testing::InitGoogleTest(&argc, argv); 267 ::testing::InitGoogleTest(&argc, argv);
262 google::ParseCommandLineFlags(&argc, &argv, true); 268 google::ParseCommandLineFlags(&argc, &argv, true);
263 webrtc::test::InitFieldTrialsFromString( 269 webrtc::test::InitFieldTrialsFromString(
264 webrtc::flags::FLAGS_force_fieldtrials); 270 webrtc::flags::FLAGS_force_fieldtrials);
265 webrtc::test::RunTest(webrtc::Loopback); 271 webrtc::test::RunTest(webrtc::Loopback);
266 return 0; 272 return 0;
267 } 273 }
OLDNEW
« no previous file with comments | « webrtc/video/screenshare_loopback.cc ('k') | webrtc/video/video_quality_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698