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 ...@@ -37,9 +37,8 @@ bool OpenCVEncoder::encode(const cv::Mat &in, definition_t definition, bitrate_t
tmp.convertTo(tmp, CV_16UC1, 1000); tmp.convertTo(tmp, CV_16UC1, 1000);
} }
// TODO: Choose these base upon resolution chunk_dim_ = (definition == definition_t::LD360) ? 1 : 4;
chunk_count_ = 16; chunk_count_ = chunk_dim_ * chunk_dim_;
chunk_dim_ = 4;
jobs_ = chunk_count_; jobs_ = chunk_count_;
for (int i=0; i<chunk_count_; ++i) { for (int i=0; i<chunk_count_; ++i) {
......
...@@ -94,13 +94,17 @@ RGBDStream.prototype.subscribe = function() { ...@@ -94,13 +94,17 @@ RGBDStream.prototype.subscribe = function() {
this.rxcount = 0; this.rxcount = 0;
this.rxmax = 10; this.rxmax = 10;
//console.log("Subscribe to ", this.uri); //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) { RGBDStream.prototype.pushFrames = function(latency, spacket, packet) {
if (spacket[1] & 0x1) this.depth = packet[4]; if (spacket[1] & 0x1) this.depth = packet[4];
else this.rgb = packet[4]; else this.rgb = packet[4];
console.log("Frame = ", packet[0], packet[1]);
for (let i=0; i < this.clients.length; i++) { for (let i=0; i < this.clients.length; i++) {
this.clients[i].push(this.uri, latency, spacket, packet); 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.
Finish editing this message first!
Please register or to comment