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

Works except blocking calls will not work

parent d3e198ee
No related branches found
No related tags found
1 merge request!40Implements #89 PNG chunking
Pipeline #11592 passed
......@@ -429,7 +429,7 @@ void Peer::data() {
}
lk.unlock();
//LOG(INFO) << "Received " << rc << " bytes";
LOG(INFO) << "Received " << rc << " bytes";
}
bool Peer::_data() {
......@@ -467,10 +467,10 @@ bool Peer::_data() {
// CHECK Safe to unlock here?
is_waiting_ = true;
lk.unlock();
//lk.unlock();
disp_->dispatch(*this, obj);
// Relock before next loop of while
lk.lock();
//lk.lock();
is_waiting_ = false;
if (scheme_ == ftl::URI::SCHEME_WS && recv_buf_.nonparsed_size() > 0) {
......
......@@ -299,7 +299,7 @@ void Streamer::_schedule() {
vector<int> pngparams = {cv::IMWRITE_PNG_COMPRESSION, 1}; // Default is 1 for fast, 9 = small but slow.
cv::imencode(".png", d2, d_buf, pngparams);
LOG(INFO) << "Sending chunk " << chunk;
LOG(INFO) << "Sending chunk " << chunk << " : size = " << chunkRGB.cols << "," << chunkRGB.rows;
UNIQUE_LOCK(src->mutex,lk);
auto i = src->clients[0].begin();
......@@ -312,6 +312,7 @@ void Streamer::_schedule() {
} catch(...) {
(*i).txcount = (*i).txmax;
}
i++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment