diff --git a/components/codecs/src/opencv_encoder.cpp b/components/codecs/src/opencv_encoder.cpp index 5dafabf29a64c14969504960da8af2bc2e27fd2a..028395b9e32865adb7a907d148308c9085588fa3 100644 --- a/components/codecs/src/opencv_encoder.cpp +++ b/components/codecs/src/opencv_encoder.cpp @@ -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) { diff --git a/web-service/src/index.js b/web-service/src/index.js index a0f7f894b8f8ddd0874b711147f4c1cbfedcb92e..7dc39a2a177eb8e9999f0a889740245ec54efcd6 100644 --- a/web-service/src/index.js +++ b/web-service/src/index.js @@ -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); }