mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-18 21:43:42 +00:00
renamed captured_fps to http_captured_fps
This commit is contained in:
@@ -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),
|
(server->fake_height ? server->fake_height : ex->frame->height),
|
||||||
us_bool_to_string(ex->frame->online),
|
us_bool_to_string(ex->frame->online),
|
||||||
stream->dev->desired_fps,
|
stream->dev->desired_fps,
|
||||||
atomic_load(&stream->run->captured_fps),
|
atomic_load(&stream->run->http_captured_fps),
|
||||||
ex->queued_fps,
|
ex->queued_fps,
|
||||||
run->stream_clients_count
|
run->stream_clients_count
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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);
|
US_RING_INIT_WITH_ITEMS(run->http_jpeg_ring, 4, us_frame_init);
|
||||||
atomic_init(&run->http_has_clients, false);
|
atomic_init(&run->http_has_clients, false);
|
||||||
atomic_init(&run->http_last_request_ts, 0);
|
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);
|
atomic_init(&run->stop, false);
|
||||||
run->blank = us_blank_init();
|
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);
|
const sll now_sec_ts = us_floor_ms(now_ts);
|
||||||
if (now_sec_ts != captured_fps_ts) {
|
if (now_sec_ts != captured_fps_ts) {
|
||||||
US_LOG_PERF_FPS("A new second has come; captured_fps=%u", captured_fps_accum);
|
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_accum = 0;
|
||||||
captured_fps_ts = now_sec_ts;
|
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);
|
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);
|
_stream_expose_frame(stream, NULL);
|
||||||
|
|
||||||
_SINK_PUT(raw_sink, run->blank->raw);
|
_SINK_PUT(raw_sink, run->blank->raw);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ typedef struct {
|
|||||||
us_ring_s *http_jpeg_ring;
|
us_ring_s *http_jpeg_ring;
|
||||||
atomic_bool http_has_clients;
|
atomic_bool http_has_clients;
|
||||||
atomic_ullong http_last_request_ts; // Seconds
|
atomic_ullong http_last_request_ts; // Seconds
|
||||||
atomic_uint captured_fps;
|
atomic_uint http_captured_fps;
|
||||||
|
|
||||||
bool last_online;
|
bool last_online;
|
||||||
long double last_as_blank_ts;
|
long double last_as_blank_ts;
|
||||||
|
|||||||
Reference in New Issue
Block a user