From 62faa7fdfe9752aaf65caee1cad594e4433a6bb8 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Fri, 25 Oct 2019 19:23:58 +0300 Subject: [PATCH] Tidy code --- applications/reconstruct/src/main.cpp | 4 +--- components/codecs/src/encoder.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index 65b92f6c9..8059e5b27 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -113,8 +113,6 @@ static void run(ftl::Configurable *root) { // Command line path is ftl file if (ext == "ftl") { - LOG(INFO) << "PATH TO CHECK: " << path; - // Create temp reader to count number of sources found in file std::ifstream file; file.open(path); @@ -129,12 +127,12 @@ static void run(ftl::Configurable *root) { LOG(INFO) << "Found " << (max_stream+1) << " sources in " << path; + // For each stream found, add a source object for (int i=0; i<max_stream; ++i) { root->getConfig()["sources"].push_back(nlohmann::json{{"uri",std::string("file://") + path + std::string("#") + std::to_string(i)}}); } } } - LOG(INFO) << (*root->get<nlohmann::json>("sources")).dump(); // Create a vector of all input RGB-Depth sources auto sources = ftl::createArray<Source>(root, "sources", net); diff --git a/components/codecs/src/encoder.cpp b/components/codecs/src/encoder.cpp index fdacc8959..834c003b7 100644 --- a/components/codecs/src/encoder.cpp +++ b/components/codecs/src/encoder.cpp @@ -73,6 +73,6 @@ bool Encoder::encode(const cv::Mat &in, preset_t preset, const auto &settings = ftl::codecs::getPreset(preset); const definition_t definition = (in.type() == CV_32F) ? settings.depth_res : settings.colour_res; const bitrate_t bitrate = (in.type() == CV_32F) ? settings.depth_qual : settings.colour_qual; - LOG(INFO) << "Encode definition: " << (int)definition; + return encode(in, definition, bitrate, cb); } -- GitLab