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

Tidy code

parent af1693bb
No related branches found
No related tags found
1 merge request!145Implements #217 cmd arg play ftl files
Pipeline #15935 passed
...@@ -113,8 +113,6 @@ static void run(ftl::Configurable *root) { ...@@ -113,8 +113,6 @@ static void run(ftl::Configurable *root) {
// Command line path is ftl file // Command line path is ftl file
if (ext == "ftl") { if (ext == "ftl") {
LOG(INFO) << "PATH TO CHECK: " << path;
// Create temp reader to count number of sources found in file // Create temp reader to count number of sources found in file
std::ifstream file; std::ifstream file;
file.open(path); file.open(path);
...@@ -129,12 +127,12 @@ static void run(ftl::Configurable *root) { ...@@ -129,12 +127,12 @@ static void run(ftl::Configurable *root) {
LOG(INFO) << "Found " << (max_stream+1) << " sources in " << path; 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) { 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)}}); 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 // 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);
......
...@@ -73,6 +73,6 @@ bool Encoder::encode(const cv::Mat &in, preset_t preset, ...@@ -73,6 +73,6 @@ bool Encoder::encode(const cv::Mat &in, preset_t preset,
const auto &settings = ftl::codecs::getPreset(preset); const auto &settings = ftl::codecs::getPreset(preset);
const definition_t definition = (in.type() == CV_32F) ? settings.depth_res : settings.colour_res; 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; 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); return encode(in, definition, bitrate, cb);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment