Skip to content
Snippets Groups Projects
Commit 41ad4de6 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Load one source of ftl

parent 3387c58a
No related branches found
No related tags found
1 merge request!145Implements #217 cmd arg play ftl files
...@@ -103,6 +103,20 @@ static void run(ftl::Configurable *root) { ...@@ -103,6 +103,20 @@ static void run(ftl::Configurable *root) {
net->start(); net->start();
net->waitConnections(); net->waitConnections();
// Check paths for an FTL file to load...
auto paths = (*root->get<nlohmann::json>("paths"));
for (auto &x : paths.items()) {
std::string path = x.value().get<std::string>();
auto eix = path.find_last_of('.');
auto ext = path.substr(eix+1);
if (ext == "ftl") {
LOG(INFO) << "PATH TO CHECK: " << path;
root->getConfig()["sources"].push_back(nlohmann::json{{"uri",std::string("file://") + path + std::string("#0")}});
}
}
LOG(INFO) << (*root->get<nlohmann::json>("sources")).dump();
// Create a vector of all input RGB-Depth sources // Create a vector of all input RGB-Depth sources
auto sources = ftl::createArray<Source>(root, "sources", net); auto sources = ftl::createArray<Source>(root, "sources", net);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment