diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index f7cdf4d3784c2e5acd271b459fcc7024ddaf1806..a4ff3bfd8c115352d346ad46f5b7467f6b206e4e 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -116,6 +116,7 @@ static void run(ftl::Configurable *root) { group.addSource(in); } + stream->setLatency(4); stream->run(); bool busy = false; diff --git a/components/codecs/src/nvpipe_encoder.cpp b/components/codecs/src/nvpipe_encoder.cpp index e03dc7073349a97bb7e090ce5b9a563b8ea2117a..42374bedecf95a749e842a3a2ed22b5226d6d390 100644 --- a/components/codecs/src/nvpipe_encoder.cpp +++ b/components/codecs/src/nvpipe_encoder.cpp @@ -91,7 +91,7 @@ bool NvPipeEncoder::encode(const cv::Mat &in, definition_t odefinition, bitrate_ bool NvPipeEncoder::_encoderMatch(const cv::Mat &in, definition_t def) { return ((in.type() == CV_32F && is_float_channel_) || - (in.type() == CV_8UC3 && !is_float_channel_)) && current_definition_ == def; + ((in.type() == CV_8UC3 || in.type() == CV_8UC4) && !is_float_channel_)) && current_definition_ == def; } bool NvPipeEncoder::_createEncoder(const cv::Mat &in, definition_t def, bitrate_t rate) { diff --git a/components/rgbd-sources/include/ftl/rgbd/streamer.hpp b/components/rgbd-sources/include/ftl/rgbd/streamer.hpp index 3f6f1c4fa35bfcb4a97877a2d46d53230e2acbec..7c6e6f479afe022cdacefbabf9098e276e0c9f79 100644 --- a/components/rgbd-sources/include/ftl/rgbd/streamer.hpp +++ b/components/rgbd-sources/include/ftl/rgbd/streamer.hpp @@ -117,6 +117,8 @@ class Streamer : public ftl::Configurable { void wait(); + void setLatency(int l) { group_.setLatency(l); } + /** * Alternative to calling run(), it will operate a single frame capture, * compress and stream cycle. diff --git a/components/rgbd-sources/src/streamer.cpp b/components/rgbd-sources/src/streamer.cpp index 3691c36fd34fadded926680169f9b4c16ec9faf6..7a9118c9f47975a31d6389982b2adb818ed8a046 100644 --- a/components/rgbd-sources/src/streamer.cpp +++ b/components/rgbd-sources/src/streamer.cpp @@ -47,7 +47,7 @@ Streamer::Streamer(nlohmann::json &config, Universe *net) hq_devices_ = (value("disable_hardware_encode", false)) ? device_t::Software : device_t::Any; //group_.setFPS(value("fps", 20)); - group_.setLatency(3); + group_.setLatency(4); compress_level_ = value("compression", 1); @@ -74,7 +74,6 @@ Streamer::Streamer(nlohmann::json &config, Universe *net) if (sources_.find(uri) != sources_.end()) { Eigen::Matrix4d pose; memcpy(pose.data(), buf.data(), buf.size()); - LOG(INFO) << "SET POSE:"; sources_[uri]->src->setPose(pose); } });