From 89b621527564abe7c3a41ce6c886f6ca0d9609da Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Mon, 28 Oct 2019 14:54:37 +0200 Subject: [PATCH] Allow source count limit --- applications/reconstruct/src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index 536daee44..9f547454f 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -99,8 +99,10 @@ static void run(ftl::Configurable *root) { LOG(INFO) << "Found " << (max_stream+1) << " sources in " << path; + int N = root->value("N", 100); + // For each stream found, add a source object - for (int i=0; i<=max_stream; ++i) { + for (int i=0; i<=min(max_stream,N-1); ++i) { root->getConfig()["sources"].push_back(nlohmann::json{{"uri",std::string("file://") + path + std::string("#") + std::to_string(i)}}); } } -- GitLab