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

Use single block for small thumbnails

parent 274e9ab8
No related branches found
No related tags found
No related merge requests found
......@@ -37,9 +37,8 @@ bool OpenCVEncoder::encode(const cv::Mat &in, definition_t definition, bitrate_t
tmp.convertTo(tmp, CV_16UC1, 1000);
}
// TODO: Choose these base upon resolution
chunk_count_ = 16;
chunk_dim_ = 4;
chunk_dim_ = (definition == definition_t::LD360) ? 1 : 4;
chunk_count_ = chunk_dim_ * chunk_dim_;
jobs_ = chunk_count_;
for (int i=0; i<chunk_count_; ++i) {
......
......@@ -94,13 +94,17 @@ RGBDStream.prototype.subscribe = function() {
this.rxcount = 0;
this.rxmax = 10;
//console.log("Subscribe to ", this.uri);
this.peer.send("get_stream", this.uri, 10, 0, [Peer.uuid], this.uri);
// TODO: Don't hard code 9 here, instead use 9 for thumbnails and 0 for
// the video...
this.peer.send("get_stream", this.uri, 10, 9, [Peer.uuid], this.uri);
}
RGBDStream.prototype.pushFrames = function(latency, spacket, packet) {
if (spacket[1] & 0x1) this.depth = packet[4];
else this.rgb = packet[4];
console.log("Frame = ", packet[0], packet[1]);
for (let i=0; i < this.clients.length; i++) {
this.clients[i].push(this.uri, latency, spacket, packet);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment