Skip to content
Snippets Groups Projects
Commit efe827d1 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

fix right channel streaming

parent 1c90b1f2
No related branches found
No related tags found
1 merge request!110Feature/121/vr
Pipeline #14410 failed
......@@ -496,7 +496,7 @@ void Streamer::_transmitPacket(StreamSource *src, const ftl::codecs::Packet &pkt
frame_no_,
static_cast<uint8_t>((chan & 0x1) | ((hasChan2) ? 0x2 : 0x0))
};
LOG(INFO) << "codec:" << (int) pkt.codec;
// Lock to prevent clients being added / removed
//SHARED_LOCK(src->mutex,lk);
auto c = src->clients.begin();
......
......@@ -36,13 +36,19 @@ class VirtualImpl : public ftl::rgbd::detail::Source {
LOG(ERROR) << "Unknown exception in render callback";
}
if (frame.hasChannel(Channel::Colour) && frame.hasChannel(Channel::Depth)) {
frame.download(Channel::Colour + Channel::Depth);
cv::swap(frame.get<cv::Mat>(Channel::Colour), rgb_);
cv::swap(frame.get<cv::Mat>(Channel::Depth), depth_);
LOG(INFO) << "Written: " << rgb_.cols;
if (frame.hasChannel(Channel::Colour)) {
frame.download(Channel::Colour);
cv::swap(frame.get<cv::Mat>(Channel::Colour), rgb_);
} else {
LOG(ERROR) << "Missing colour or depth frame in rendering";
LOG(ERROR) << "Channel 1 frame in rendering";
}
if ((host_->getChannel() != Channel::None) &&
frame.hasChannel(host_->getChannel())) {
frame.download(host_->getChannel());
cv::swap(frame.get<cv::Mat>(host_->getChannel()), depth_);
} else {
LOG(ERROR) << "Channel 2 frame in rendering";
}
auto cb = host_->callback();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment