renamed captured_fps to http_captured_fps

This commit is contained in:
Maxim Devaev 2024-03-02 21:33:55 +02:00
parent 72741b90f4
commit 6a0ee68692
3 changed files with 5 additions and 5 deletions

View File

@ -444,7 +444,7 @@ static void _http_callback_state(struct evhttp_request *request, void *v_server)
(server->fake_height ? server->fake_height : ex->frame->height),
us_bool_to_string(ex->frame->online),
stream->dev->desired_fps,
atomic_load(&stream->run->captured_fps),
atomic_load(&stream->run->http_captured_fps),
ex->queued_fps,
run->stream_clients_count
);

View File

@ -89,7 +89,7 @@ us_stream_s *us_stream_init(us_device_s *dev, us_encoder_s *enc) {
US_RING_INIT_WITH_ITEMS(run->http_jpeg_ring, 4, us_frame_init);
atomic_init(&run->http_has_clients, false);
atomic_init(&run->http_last_request_ts, 0);
atomic_init(&run->captured_fps, 0);
atomic_init(&run->http_captured_fps, 0);
atomic_init(&run->stop, false);
run->blank = us_blank_init();
@ -198,7 +198,7 @@ void us_stream_loop(us_stream_s *stream) {
const sll now_sec_ts = us_floor_ms(now_ts);
if (now_sec_ts != captured_fps_ts) {
US_LOG_PERF_FPS("A new second has come; captured_fps=%u", captured_fps_accum);
atomic_store(&run->captured_fps, captured_fps_accum);
atomic_store(&run->http_captured_fps, captured_fps_accum);
captured_fps_accum = 0;
captured_fps_ts = now_sec_ts;
}
@ -319,7 +319,7 @@ static int _stream_init_loop(us_stream_s *stream) {
}
us_blank_draw(run->blank, "< NO SIGNAL >", width, height);
atomic_store(&run->captured_fps, 0);
atomic_store(&run->http_captured_fps, 0);
_stream_expose_frame(stream, NULL);
_SINK_PUT(raw_sink, run->blank->raw);

View File

@ -50,7 +50,7 @@ typedef struct {
us_ring_s *http_jpeg_ring;
atomic_bool http_has_clients;
atomic_ullong http_last_request_ts; // Seconds
atomic_uint captured_fps;
atomic_uint http_captured_fps;
bool last_online;
long double last_as_blank_ts;