mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-04-11 17:16:13 +00:00
queued_fps = 0 for no clients
This commit is contained in:
@@ -744,6 +744,7 @@ static void _http_queue_send_stream(struct http_server_t *server, bool stream_up
|
|||||||
struct evhttp_connection *conn;
|
struct evhttp_connection *conn;
|
||||||
struct bufferevent *buf_event;
|
struct bufferevent *buf_event;
|
||||||
long long now;
|
long long now;
|
||||||
|
bool has_clients = false;
|
||||||
bool queued = false;
|
bool queued = false;
|
||||||
|
|
||||||
for (struct stream_client_t *client = server->run->stream_clients; client != NULL; client = client->next) {
|
for (struct stream_client_t *client = server->run->stream_clients; client != NULL; client = client->next) {
|
||||||
@@ -774,6 +775,8 @@ static void _http_queue_send_stream(struct http_server_t *server, bool stream_up
|
|||||||
} else if (stream_updated) { // Для dual
|
} else if (stream_updated) { // Для dual
|
||||||
client->updated_prev = false;
|
client->updated_prev = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_clients = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,6 +790,8 @@ static void _http_queue_send_stream(struct http_server_t *server, bool stream_up
|
|||||||
queued_fps_second = now;
|
queued_fps_second = now;
|
||||||
}
|
}
|
||||||
queued_fps_accum += 1;
|
queued_fps_accum += 1;
|
||||||
|
} else if (!has_clients) {
|
||||||
|
server->run->exposed->queued_fps = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user