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

Unified Diff: webrtc/video/screenshare_loopback.cc

Issue 2946893003: What can't loopback test be more like full stack test? (Closed)
Patch Set: Explicit cast to make win happy Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/BUILD.gn ('k') | webrtc/video/video_loopback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/screenshare_loopback.cc
diff --git a/webrtc/video/screenshare_loopback.cc b/webrtc/video/screenshare_loopback.cc
index 46f662a45d4a87f0417fe85d845b25ffe24634e8..c0638c9b1aae0099189a6a5f72bed59919786b04 100644
--- a/webrtc/video/screenshare_loopback.cc
+++ b/webrtc/video/screenshare_loopback.cc
@@ -127,7 +127,15 @@ int StdPropagationDelayMs() {
return static_cast<int>(FLAG_std_propagation_delay_ms);
}
-DEFINE_int(selected_stream, 0, "ID of the stream to show or analyze.");
+DEFINE_int(num_streams, 0, "Number of streams to show or analyze.");
+int NumStreams() {
+ return static_cast<int>(FLAG_num_streams);
+}
+
+DEFINE_int(selected_stream,
+ 0,
+ "ID of the stream to show or analyze. "
+ "Set to the number of streams to show them all.");
int SelectedStream() {
return static_cast<int>(FLAG_selected_stream);
}
@@ -268,6 +276,11 @@ void Loopback() {
params.pipe = pipe_config;
params.logs = flags::FLAG_logs;
+ if (flags::NumStreams() > 1 && flags::Stream0().empty() &&
+ flags::Stream1().empty()) {
+ params.ss.infer_streams = true;
+ }
+
std::vector<std::string> stream_descriptors;
stream_descriptors.push_back(flags::Stream0());
stream_descriptors.push_back(flags::Stream1());
@@ -275,7 +288,7 @@ void Loopback() {
SL_descriptors.push_back(flags::SL0());
SL_descriptors.push_back(flags::SL1());
VideoQualityTest::FillScalabilitySettings(
- &params, stream_descriptors, flags::SelectedStream(),
+ &params, stream_descriptors, flags::NumStreams(), flags::SelectedStream(),
flags::NumSpatialLayers(), flags::SelectedSL(), SL_descriptors);
VideoQualityTest test;
@@ -295,8 +308,10 @@ int main(int argc, char* argv[]) {
return 0;
}
- webrtc::test::InitFieldTrialsFromString(
- webrtc::flags::FLAG_force_fieldtrials);
+ // InitFieldTrialsFromString needs a reference to an std::string instance,
+ // with a scope that outlives the test.
+ std::string field_trials = webrtc::flags::FLAG_force_fieldtrials;
+ webrtc::test::InitFieldTrialsFromString(field_trials);
webrtc::test::RunTest(webrtc::Loopback);
return 0;
}
« no previous file with comments | « webrtc/video/BUILD.gn ('k') | webrtc/video/video_loopback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698