Skip to content
Snippets Groups Projects

Resolves #159 proxy of sources

Merged Nicolas Pope requested to merge bug/196/snapshotcapture into master
1 file
+ 12
14
Compare changes
  • Side-by-side
  • Inline
@@ -248,26 +248,24 @@ void NetSource::_recvPacket(short ttimeoff, const ftl::codecs::StreamPacket &spk
const ftl::rgbd::Channel chan = host_->getChannel();
int rchan = spkt.channel & 0x1;
// Ignore any unwanted second channel
if (chan == ftl::rgbd::Channel::None && rchan > 0) {
LOG(INFO) << "Unwanted channel";
//return;
// TODO: Allow decode to be skipped
}
NetFrame &frame = queue_.getFrame(spkt.timestamp, cv::Size(params_.width, params_.height), CV_8UC3, (isFloatChannel(chan) ? CV_32FC1 : CV_8UC3));
// Update frame statistics
frame.tx_size += pkt.data.size();
_createDecoder(rchan, pkt);
auto *decoder = (rchan == 0) ? decoder_c1_ : decoder_c2_;
if (!decoder) {
LOG(ERROR) << "No frame decoder available";
return;
}
// Ignore any unwanted second channel
if (!(chan == ftl::rgbd::Channel::None && rchan > 0)) {
_createDecoder(rchan, pkt);
auto *decoder = (rchan == 0) ? decoder_c1_ : decoder_c2_;
if (!decoder) {
LOG(ERROR) << "No frame decoder available";
return;
}
decoder->decode(pkt, (rchan == 0) ? frame.channel1 : frame.channel2);
decoder->decode(pkt, (rchan == 0) ? frame.channel1 : frame.channel2);
} else {
//LOG(INFO) << "Unwanted frame";
}
// Apply colour correction to chunk
//ftl::rgbd::colourCorrection(tmp_rgb, gamma_, temperature_);
Loading