If we asked for stream, keep streaming even not decoding or other problem. We will wait for the situation to change

This commit is contained in:
Isaac Connor 2022-03-04 12:06:24 -05:00
parent 494da65b9a
commit 9b9746113e
1 changed files with 3 additions and 13 deletions

View File

@ -492,19 +492,6 @@ void MonitorStream::runStream() {
// Notify capture that we might want to view // Notify capture that we might want to view
monitor->setLastViewed(); monitor->setLastViewed();
if (!checkInitialised()) {
if (monitor->Capturing() != Monitor::CAPTURING_ONDEMAND) {
fputs("Content-Type: multipart/x-mixed-replace; boundary=" BOUNDARY "\r\n\r\n", stdout);
sendTextFrame("Unable to send image");
return;
}
while (!zm_terminate && !checkInitialised()) {
Debug(1, "Waiting for capture");
usleep(100000);
monitor->setLastViewed();
}
}
if (type == STREAM_SINGLE) { if (type == STREAM_SINGLE) {
// Not yet migrated over to stream class // Not yet migrated over to stream class
SingleImage(scale); SingleImage(scale);
@ -524,6 +511,9 @@ void MonitorStream::runStream() {
if (!checkInitialised()) { if (!checkInitialised()) {
if (!loadMonitor(monitor_id)) { if (!loadMonitor(monitor_id)) {
if (!sendTextFrame("Not connected")) return; if (!sendTextFrame("Not connected")) return;
} else if (monitor->Capturing() == Monitor::CAPTURING_ONDEMAND) {
monitor->setLastViewed();
if (!sendTextFrame("Waiting for capture")) return;
} else { } else {
if (!sendTextFrame("Unable to stream")) return; if (!sendTextFrame("Unable to stream")) return;
} }