Index: webrtc/video/video_loopback.cc |
diff --git a/webrtc/video/video_loopback.cc b/webrtc/video/video_loopback.cc |
index 518129479f11374c13455aada4780b4fca091c00..10998c8867131362d26cd0b18c49921204f9877d 100644 |
--- a/webrtc/video/video_loopback.cc |
+++ b/webrtc/video/video_loopback.cc |
@@ -191,6 +191,11 @@ DEFINE_bool(allow_reordering, false, "Allow packet reordering to occur"); |
DEFINE_bool(use_fec, false, "Use forward error correction."); |
+DEFINE_bool(audio, false, "Add audio stream"); |
+ |
+DEFINE_bool(audio_video_sync, false, "Sync audio and video stream (no effect if" |
+ " audio is false)"); |
+ |
DEFINE_string( |
force_fieldtrials, |
"", |
@@ -224,19 +229,20 @@ void Loopback() { |
call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000; |
call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000; |
- VideoQualityTest::Params params{ |
- {flags::Width(), flags::Height(), flags::Fps(), |
- flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000, |
- flags::MaxBitrateKbps() * 1000, flags::FLAGS_suspend_below_min_bitrate, |
- flags::Codec(), flags::NumTemporalLayers(), flags::SelectedTL(), |
- 0, // No min transmit bitrate. |
- flags::FLAGS_send_side_bwe, flags::FLAGS_use_fec, call_bitrate_config}, |
- {flags::Clip()}, |
- {}, // Screenshare specific. |
- {"video", 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename(), |
- flags::GraphTitle()}, |
- pipe_config, |
- flags::FLAGS_logs}; |
+ VideoQualityTest::Params params; |
+ params.common = {flags::Width(), flags::Height(), flags::Fps(), |
+ flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000, |
+ flags::MaxBitrateKbps() * 1000, flags::FLAGS_suspend_below_min_bitrate, |
+ flags::Codec(), flags::NumTemporalLayers(), flags::SelectedTL(), |
+ 0, // No min transmit bitrate. |
+ flags::FLAGS_send_side_bwe, flags::FLAGS_use_fec, call_bitrate_config}; |
+ params.video = {flags::Clip()}; |
+ params.analyzer = {"video", 0.0, 0.0, flags::DurationSecs(), |
+ flags::OutputFilename(), flags::GraphTitle()}; |
+ params.pipe = pipe_config; |
+ params.logs = flags::FLAGS_logs; |
+ params.audio = flags::FLAGS_audio, |
+ params.audio_video_sync = flags::FLAGS_audio_video_sync; |
std::vector<std::string> stream_descriptors; |
stream_descriptors.push_back(flags::Stream0()); |
@@ -252,7 +258,7 @@ void Loopback() { |
if (flags::DurationSecs()) { |
test.RunWithAnalyzer(params); |
} else { |
- test.RunWithVideoRenderer(params); |
+ test.RunWithRenderers(params); |
} |
} |
} // namespace webrtc |