mirror of
https://github.com/pikvm/ustreamer.git
synced 2025-12-23 18:50:00 +00:00
fps -> fpsi, store frame meta
This commit is contained in:
parent
580ca68291
commit
14e9d9f7af
@ -36,7 +36,7 @@
|
||||
#include "../libs/logging.h"
|
||||
#include "../libs/frame.h"
|
||||
#include "../libs/memsink.h"
|
||||
#include "../libs/fps.h"
|
||||
#include "../libs/fpsi.h"
|
||||
#include "../libs/signal.h"
|
||||
#include "../libs/options.h"
|
||||
|
||||
@ -222,7 +222,7 @@ static int _dump_sink(
|
||||
const useconds_t interval_us = interval * 1000000;
|
||||
|
||||
us_frame_s *frame = us_frame_init();
|
||||
us_fps_s *fps = us_fps_init("SINK");
|
||||
us_fpsi_s *fpsi = us_fpsi_init("SINK", false);
|
||||
us_memsink_s *sink = NULL;
|
||||
|
||||
if ((sink = us_memsink_init_opened("input", sink_name, false, 0, false, 0, sink_timeout)) == NULL) {
|
||||
@ -251,7 +251,7 @@ static int _dump_sink(
|
||||
US_LOG_DEBUG(" stride=%u, grab_ts=%.3Lf, encode_begin_ts=%.3Lf, encode_end_ts=%.3Lf",
|
||||
frame->stride, frame->grab_ts, frame->encode_begin_ts, frame->encode_end_ts);
|
||||
|
||||
us_fps_bump(fps);
|
||||
us_fpsi_bump(fpsi, NULL);
|
||||
|
||||
if (ctx->v_output != NULL) {
|
||||
ctx->write(ctx->v_output, frame);
|
||||
@ -278,7 +278,7 @@ static int _dump_sink(
|
||||
|
||||
error:
|
||||
US_DELETE(sink, us_memsink_destroy);
|
||||
us_fps_destroy(fps);
|
||||
us_fpsi_destroy(fpsi);
|
||||
us_frame_destroy(frame);
|
||||
US_LOG_INFO("Bye-bye");
|
||||
return retval;
|
||||
|
||||
@ -20,41 +20,76 @@
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include "fps.h"
|
||||
#include "fpsi.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "tools.h"
|
||||
#include "threading.h"
|
||||
#include "logging.h"
|
||||
#include "frame.h"
|
||||
|
||||
|
||||
us_fps_s *us_fps_init(const char *name) {
|
||||
us_fps_s *fps;
|
||||
US_CALLOC(fps, 1);
|
||||
fps->name = us_strdup(name);
|
||||
return fps;
|
||||
static void _fpsi_bump_unsafe(us_fpsi_s *fpsi, const us_frame_s *frame);
|
||||
|
||||
|
||||
us_fpsi_s *us_fpsi_init(const char *name, bool with_meta) {
|
||||
us_fpsi_s *fpsi;
|
||||
US_CALLOC(fpsi, 1);
|
||||
fpsi->name = us_strdup(name);
|
||||
fpsi->with_meta = with_meta;
|
||||
US_MUTEX_INIT(fpsi->mutex);
|
||||
return fpsi;
|
||||
}
|
||||
|
||||
void us_fps_destroy(us_fps_s *fps) {
|
||||
free(fps->name);
|
||||
free(fps);
|
||||
void us_fpsi_destroy(us_fpsi_s *fpsi) {
|
||||
US_MUTEX_DESTROY(fpsi->mutex);
|
||||
free(fpsi->name);
|
||||
free(fpsi);
|
||||
}
|
||||
|
||||
void us_fps_bump(us_fps_s *fps) {
|
||||
void us_fpsi_bump(us_fpsi_s *fpsi, const us_frame_s *frame) {
|
||||
US_MUTEX_LOCK(fpsi->mutex);
|
||||
_fpsi_bump_unsafe(fpsi, frame);
|
||||
US_MUTEX_UNLOCK(fpsi->mutex);
|
||||
}
|
||||
|
||||
static void _fpsi_bump_unsafe(us_fpsi_s *fpsi, const us_frame_s *frame) {
|
||||
const sll now_sec_ts = us_floor_ms(us_get_now_monotonic());
|
||||
if (now_sec_ts != fps->ts) {
|
||||
US_LOG_PERF_FPS("FPS: %s: %u", fps->name, fps->accum);
|
||||
atomic_store(&fps->current, fps->accum);
|
||||
fps->accum = 0;
|
||||
fps->ts = now_sec_ts;
|
||||
if (now_sec_ts != fpsi->ts) {
|
||||
US_LOG_PERF_FPS("FPS: %s: %u", fpsi->name, fpsi->accum);
|
||||
fpsi->current = fpsi->accum;
|
||||
fpsi->accum = 0;
|
||||
fpsi->ts = now_sec_ts;
|
||||
}
|
||||
++fpsi->accum;
|
||||
if (frame != NULL) {
|
||||
assert(fpsi->with_meta);
|
||||
US_FRAME_COPY_META(frame, &fpsi->meta);
|
||||
} else {
|
||||
assert(!fpsi->with_meta);
|
||||
}
|
||||
++fps->accum;
|
||||
}
|
||||
|
||||
void us_fps_reset(us_fps_s *fps) {
|
||||
us_fps_bump(fps); // Just show the log record
|
||||
fps->accum = 0;
|
||||
void us_fpsi_reset(us_fpsi_s *fpsi, const us_frame_s *frame) {
|
||||
US_MUTEX_LOCK(fpsi->mutex);
|
||||
_fpsi_bump_unsafe(fpsi, frame); // Just show the log record
|
||||
fpsi->accum = 0;
|
||||
US_MUTEX_UNLOCK(fpsi->mutex);
|
||||
}
|
||||
|
||||
uint us_fps_get(us_fps_s *fps) {
|
||||
return atomic_load(&fps->current);
|
||||
uint us_fpsi_get(us_fpsi_s *fpsi, us_fpsi_meta_s *meta) {
|
||||
if (meta != NULL) {
|
||||
assert(fpsi->with_meta);
|
||||
} else {
|
||||
assert(!fpsi->with_meta);
|
||||
}
|
||||
US_MUTEX_LOCK(fpsi->mutex);
|
||||
uint current = fpsi->current;
|
||||
if (meta != NULL) {
|
||||
US_FRAME_COPY_META(&fpsi->meta, meta);
|
||||
}
|
||||
US_MUTEX_UNLOCK(fpsi->mutex);
|
||||
return current;
|
||||
}
|
||||
@ -22,22 +22,30 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "frame.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
uint accum;
|
||||
ldf ts;
|
||||
atomic_uint current;
|
||||
} us_fps_s;
|
||||
US_FRAME_META_DECLARE;
|
||||
} us_fpsi_meta_s;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
bool with_meta;
|
||||
uint accum;
|
||||
ldf ts;
|
||||
uint current;
|
||||
us_fpsi_meta_s meta;
|
||||
pthread_mutex_t mutex;
|
||||
} us_fpsi_s;
|
||||
|
||||
|
||||
us_fps_s *us_fps_init(const char *name);
|
||||
void us_fps_destroy(us_fps_s *fps);
|
||||
us_fpsi_s *us_fpsi_init(const char *name, bool with_meta);
|
||||
void us_fpsi_destroy(us_fpsi_s *fpsi);
|
||||
|
||||
void us_fps_bump(us_fps_s *fps);
|
||||
void us_fps_reset(us_fps_s *fps);
|
||||
uint us_fps_get(us_fps_s *fps);
|
||||
void us_fpsi_bump(us_fpsi_s *fpsi, const us_frame_s *frame);
|
||||
void us_fpsi_reset(us_fpsi_s *fpsi, const us_frame_s *meta);
|
||||
uint us_fpsi_get(us_fpsi_s *fpsi, us_fpsi_meta_s *meta);
|
||||
@ -54,30 +54,30 @@ typedef struct {
|
||||
|
||||
|
||||
#define US_FRAME_COPY_META(x_src, x_dest) { \
|
||||
x_dest->width = x_src->width; \
|
||||
x_dest->height = x_src->height; \
|
||||
x_dest->format = x_src->format; \
|
||||
x_dest->stride = x_src->stride; \
|
||||
x_dest->online = x_src->online; \
|
||||
x_dest->key = x_src->key; \
|
||||
x_dest->gop = x_src->gop; \
|
||||
(x_dest)->width = (x_src)->width; \
|
||||
(x_dest)->height = (x_src)->height; \
|
||||
(x_dest)->format = (x_src)->format; \
|
||||
(x_dest)->stride = (x_src)->stride; \
|
||||
(x_dest)->online = (x_src)->online; \
|
||||
(x_dest)->key = (x_src)->key; \
|
||||
(x_dest)->gop = (x_src)->gop; \
|
||||
\
|
||||
x_dest->grab_ts = x_src->grab_ts; \
|
||||
x_dest->encode_begin_ts = x_src->encode_begin_ts; \
|
||||
x_dest->encode_end_ts = x_src->encode_end_ts; \
|
||||
(x_dest)->grab_ts = (x_src)->grab_ts; \
|
||||
(x_dest)->encode_begin_ts = (x_src)->encode_begin_ts; \
|
||||
(x_dest)->encode_end_ts = (x_src)->encode_end_ts; \
|
||||
}
|
||||
|
||||
#define US_FRAME_COMPARE_GEOMETRY(x_a, x_b) ( \
|
||||
/* Compare the used size and significant meta (no timings) */ \
|
||||
x_a->used == x_b->used \
|
||||
(x_a)->used == (x_b)->used \
|
||||
\
|
||||
&& x_a->width == x_b->width \
|
||||
&& x_a->height == x_b->height \
|
||||
&& x_a->format == x_b->format \
|
||||
&& x_a->stride == x_b->stride \
|
||||
&& x_a->online == x_b->online \
|
||||
&& x_a->key == x_b->key \
|
||||
&& x_a->gop == x_b->gop \
|
||||
&& (x_a)->width == (x_b)->width \
|
||||
&& (x_a)->height == (x_b)->height \
|
||||
&& (x_a)->format == (x_b)->format \
|
||||
&& (x_a)->stride == (x_b)->stride \
|
||||
&& (x_a)->online == (x_b)->online \
|
||||
&& (x_a)->key == (x_b)->key \
|
||||
&& (x_a)->gop == (x_b)->gop \
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ us_server_s *us_server_init(us_stream_s *stream) {
|
||||
us_server_exposed_s *exposed;
|
||||
US_CALLOC(exposed, 1);
|
||||
exposed->frame = us_frame_init();
|
||||
exposed->queued_fps = us_fps_init("MJPEG-QUEUED");
|
||||
exposed->queued_fpsi = us_fpsi_init("MJPEG-QUEUED", false);
|
||||
|
||||
us_server_runtime_s *run;
|
||||
US_CALLOC(run, 1);
|
||||
@ -169,7 +169,7 @@ void us_server_destroy(us_server_s *server) {
|
||||
});
|
||||
|
||||
US_LIST_ITERATE(run->stream_clients, client, { // cppcheck-suppress constStatement
|
||||
us_fps_destroy(client->fps);
|
||||
us_fpsi_destroy(client->fpsi);
|
||||
free(client->key);
|
||||
free(client->hostport);
|
||||
free(client);
|
||||
@ -177,7 +177,7 @@ void us_server_destroy(us_server_s *server) {
|
||||
|
||||
US_DELETE(run->auth_token, free);
|
||||
|
||||
us_fps_destroy(run->exposed->queued_fps);
|
||||
us_fpsi_destroy(run->exposed->queued_fpsi);
|
||||
us_frame_destroy(run->exposed->frame);
|
||||
free(run->exposed);
|
||||
free(server->run);
|
||||
@ -503,21 +503,18 @@ static void _http_callback_state(struct evhttp_request *request, void *v_server)
|
||||
_A_EVBUFFER_ADD_PRINTF(buf, "},");
|
||||
}
|
||||
|
||||
uint width;
|
||||
uint height;
|
||||
bool online;
|
||||
uint captured_fps;
|
||||
us_stream_get_capture_state(stream, &width, &height, &online, &captured_fps);
|
||||
us_fpsi_meta_s captured_meta;
|
||||
const uint captured_fps = us_fpsi_get(stream->run->http_captured_fpsi, &captured_meta);
|
||||
_A_EVBUFFER_ADD_PRINTF(buf,
|
||||
" \"source\": {\"resolution\": {\"width\": %u, \"height\": %u},"
|
||||
" \"online\": %s, \"desired_fps\": %u, \"captured_fps\": %u},"
|
||||
" \"stream\": {\"queued_fps\": %u, \"clients\": %u, \"clients_stat\": {",
|
||||
(server->fake_width ? server->fake_width : width),
|
||||
(server->fake_height ? server->fake_height : height),
|
||||
us_bool_to_string(online),
|
||||
(server->fake_width ? server->fake_width : captured_meta.width),
|
||||
(server->fake_height ? server->fake_height : captured_meta.height),
|
||||
us_bool_to_string(captured_meta.online),
|
||||
stream->cap->desired_fps,
|
||||
captured_fps,
|
||||
us_fps_get(ex->queued_fps),
|
||||
us_fpsi_get(ex->queued_fpsi, NULL),
|
||||
run->stream_clients_count
|
||||
);
|
||||
|
||||
@ -526,7 +523,7 @@ static void _http_callback_state(struct evhttp_request *request, void *v_server)
|
||||
"\"%" PRIx64 "\": {\"fps\": %u, \"extra_headers\": %s, \"advance_headers\": %s,"
|
||||
" \"dual_final_frames\": %s, \"zero_data\": %s, \"key\": \"%s\"}%s",
|
||||
client->id,
|
||||
us_fps_get(client->fps),
|
||||
us_fpsi_get(client->fpsi, NULL),
|
||||
us_bool_to_string(client->extra_headers),
|
||||
us_bool_to_string(client->advance_headers),
|
||||
us_bool_to_string(client->dual_final_frames),
|
||||
@ -596,7 +593,7 @@ static void _http_callback_stream(struct evhttp_request *request, void *v_server
|
||||
{
|
||||
char *name;
|
||||
US_ASPRINTF(name, "MJPEG-CLIENT-%" PRIx64, client->id);
|
||||
client->fps = us_fps_init(name);
|
||||
client->fpsi = us_fpsi_init(name, false);
|
||||
free(name);
|
||||
}
|
||||
|
||||
@ -636,7 +633,7 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
||||
us_server_s *const server = client->server;
|
||||
us_server_exposed_s *const ex = server->run->exposed;
|
||||
|
||||
us_fps_bump(client->fps);
|
||||
us_fpsi_bump(client->fpsi, NULL);
|
||||
|
||||
struct evbuffer *buf;
|
||||
_A_EVBUFFER_NEW(buf);
|
||||
@ -739,7 +736,7 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
||||
ex->dropped,
|
||||
ex->frame->width,
|
||||
ex->frame->height,
|
||||
us_fps_get(client->fps),
|
||||
us_fpsi_get(client->fpsi, NULL),
|
||||
ex->frame->grab_ts,
|
||||
ex->frame->encode_begin_ts,
|
||||
ex->frame->encode_end_ts,
|
||||
@ -796,7 +793,7 @@ static void _http_callback_stream_error(struct bufferevent *buf_event, short wha
|
||||
struct evhttp_connection *conn = evhttp_request_get_connection(client->request);
|
||||
US_DELETE(conn, evhttp_connection_free);
|
||||
|
||||
us_fps_destroy(client->fps);
|
||||
us_fpsi_destroy(client->fpsi);
|
||||
free(client->key);
|
||||
free(client->hostport);
|
||||
free(client);
|
||||
@ -843,9 +840,9 @@ static void _http_send_stream(us_server_s *server, bool stream_updated, bool fra
|
||||
});
|
||||
|
||||
if (queued) {
|
||||
us_fps_bump(ex->queued_fps);
|
||||
us_fpsi_bump(ex->queued_fpsi, NULL);
|
||||
} else if (!has_clients) {
|
||||
us_fps_reset(ex->queued_fps);
|
||||
us_fpsi_reset(ex->queued_fpsi, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -862,11 +859,9 @@ static void _http_send_snapshot(us_server_s *server) {
|
||||
US_SNPRINTF(header_buf, 255, "%u", x_value); \
|
||||
_A_ADD_HEADER(request, x_key, header_buf); \
|
||||
}
|
||||
uint width;
|
||||
uint height;
|
||||
uint captured_fps; // Unused
|
||||
bool online;
|
||||
us_stream_get_capture_state(server->stream, &width, &height, &online, &captured_fps);
|
||||
|
||||
us_fpsi_meta_s captured_meta;
|
||||
us_fpsi_get(server->stream->run->http_captured_fpsi, &captured_meta);
|
||||
|
||||
US_LIST_ITERATE(server->run->snapshot_clients, client, { // cppcheck-suppress constStatement
|
||||
struct evhttp_request *request = client->request;
|
||||
@ -876,10 +871,10 @@ static void _http_send_snapshot(us_server_s *server) {
|
||||
|
||||
if (has_fresh_snapshot || timed_out) {
|
||||
us_frame_s *frame = ex->frame;
|
||||
if (!online) {
|
||||
if (!captured_meta.online) {
|
||||
if (blank == NULL) {
|
||||
blank = us_blank_init();
|
||||
us_blank_draw(blank, "< NO SIGNAL >", width, height);
|
||||
us_blank_draw(blank, "< NO SIGNAL >", captured_meta.width, captured_meta.height);
|
||||
}
|
||||
frame = blank->jpeg;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include "../../libs/types.h"
|
||||
#include "../../libs/frame.h"
|
||||
#include "../../libs/list.h"
|
||||
#include "../../libs/fps.h"
|
||||
#include "../../libs/fpsi.h"
|
||||
#include "../encoder.h"
|
||||
#include "../stream.h"
|
||||
|
||||
@ -52,7 +52,7 @@ typedef struct {
|
||||
bool need_first_frame;
|
||||
bool updated_prev;
|
||||
|
||||
us_fps_s *fps;
|
||||
us_fpsi_s *fpsi;
|
||||
|
||||
US_LIST_DECLARE;
|
||||
} us_stream_client_s;
|
||||
@ -67,7 +67,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
us_frame_s *frame;
|
||||
us_fps_s *queued_fps;
|
||||
us_fpsi_s *queued_fpsi;
|
||||
uint dropped;
|
||||
ldf expose_begin_ts;
|
||||
ldf expose_cmp_ts;
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
#include "../libs/memsink.h"
|
||||
#include "../libs/capture.h"
|
||||
#include "../libs/unjpeg.h"
|
||||
#include "../libs/fps.h"
|
||||
#include "../libs/fpsi.h"
|
||||
#ifdef WITH_V4P
|
||||
# include "../libs/drm/drm.h"
|
||||
#endif
|
||||
@ -72,8 +72,6 @@ typedef struct {
|
||||
} _worker_context_s;
|
||||
|
||||
|
||||
static void _stream_set_capture_state(us_stream_s *stream, uint width, uint height, bool online, uint captured_fps);
|
||||
|
||||
static void *_releaser_thread(void *v_ctx);
|
||||
static void *_jpeg_thread(void *v_ctx);
|
||||
static void *_raw_thread(void *v_ctx);
|
||||
@ -104,7 +102,7 @@ us_stream_s *us_stream_init(us_capture_s *cap, us_encoder_s *enc) {
|
||||
atomic_init(&run->http_has_clients, false);
|
||||
atomic_init(&run->http_snapshot_requested, 0);
|
||||
atomic_init(&run->http_last_request_ts, 0);
|
||||
atomic_init(&run->http_capture_state, 0);
|
||||
run->http_captured_fpsi = us_fpsi_init("STREAM-CAPTURED", true);
|
||||
atomic_init(&run->stop, false);
|
||||
run->blank = us_blank_init();
|
||||
|
||||
@ -118,12 +116,13 @@ us_stream_s *us_stream_init(us_capture_s *cap, us_encoder_s *enc) {
|
||||
stream->run = run;
|
||||
|
||||
us_blank_draw(run->blank, "< NO SIGNAL >", cap->width, cap->height);
|
||||
_stream_set_capture_state(stream, cap->width, cap->height, false, 0);
|
||||
us_fpsi_reset(run->http_captured_fpsi, run->blank->raw);
|
||||
return stream;
|
||||
}
|
||||
|
||||
void us_stream_destroy(us_stream_s *stream) {
|
||||
us_blank_destroy(stream->run->blank);
|
||||
us_fpsi_destroy(stream->run->http_captured_fpsi);
|
||||
US_RING_DELETE_WITH_ITEMS(stream->run->http_jpeg_ring, us_frame_destroy);
|
||||
free(stream->run);
|
||||
free(stream);
|
||||
@ -176,8 +175,6 @@ void us_stream_loop(us_stream_s *stream) {
|
||||
# endif
|
||||
# undef CREATE_WORKER
|
||||
|
||||
us_fps_s *fps = us_fps_init("CAP");
|
||||
|
||||
US_LOG_INFO("Capturing ...");
|
||||
|
||||
uint slowdown_count = 0;
|
||||
@ -189,8 +186,7 @@ void us_stream_loop(us_stream_s *stream) {
|
||||
default: goto close; // Any error
|
||||
}
|
||||
|
||||
us_fps_bump(fps);
|
||||
_stream_set_capture_state(stream, cap->run->width, cap->run->height, true, us_fps_get(fps));
|
||||
us_fpsi_bump(run->http_captured_fpsi, &hw->raw);
|
||||
|
||||
# ifdef WITH_GPIO
|
||||
us_gpio_set_stream_online(true);
|
||||
@ -221,8 +217,6 @@ void us_stream_loop(us_stream_s *stream) {
|
||||
}
|
||||
|
||||
close:
|
||||
us_fps_destroy(fps);
|
||||
|
||||
atomic_store(&threads_stop, true);
|
||||
|
||||
# define DELETE_WORKER(x_ctx) if (x_ctx != NULL) { \
|
||||
@ -264,24 +258,6 @@ void us_stream_loop_break(us_stream_s *stream) {
|
||||
atomic_store(&stream->run->stop, true);
|
||||
}
|
||||
|
||||
void us_stream_get_capture_state(us_stream_s *stream, uint *width, uint *height, bool *online, uint *captured_fps) {
|
||||
const u64 state = atomic_load(&stream->run->http_capture_state);
|
||||
*width = state & 0xFFFF;
|
||||
*height = (state >> 16) & 0xFFFF;
|
||||
*captured_fps = (state >> 32) & 0xFFFF;
|
||||
*online = (state >> 48) & 1;
|
||||
}
|
||||
|
||||
void _stream_set_capture_state(us_stream_s *stream, uint width, uint height, bool online, uint captured_fps) {
|
||||
const u64 state = (
|
||||
(u64)(width & 0xFFFF)
|
||||
| ((u64)(height & 0xFFFF) << 16)
|
||||
| ((u64)(captured_fps & 0xFFFF) << 32)
|
||||
| ((u64)(online ? 1 : 0) << 48)
|
||||
);
|
||||
atomic_store(&stream->run->http_capture_state, state);
|
||||
}
|
||||
|
||||
static void *_releaser_thread(void *v_ctx) {
|
||||
US_THREAD_SETTLE("str_rel")
|
||||
_releaser_context_s *ctx = v_ctx;
|
||||
@ -576,8 +552,7 @@ static int _stream_init_loop(us_stream_s *stream) {
|
||||
height = stream->cap->height;
|
||||
}
|
||||
us_blank_draw(run->blank, "< NO SIGNAL >", width, height);
|
||||
|
||||
_stream_set_capture_state(stream, width, height, false, 0);
|
||||
us_fpsi_reset(run->http_captured_fpsi, run->blank->raw);
|
||||
|
||||
_stream_expose_jpeg(stream, run->blank->jpeg);
|
||||
_stream_expose_raw(stream, run->blank->raw);
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "../libs/frame.h"
|
||||
#include "../libs/memsink.h"
|
||||
#include "../libs/capture.h"
|
||||
#include "../libs/fpsi.h"
|
||||
#ifdef WITH_V4P
|
||||
# include "../libs/drm/drm.h"
|
||||
#endif
|
||||
@ -52,7 +53,7 @@ typedef struct {
|
||||
atomic_bool http_has_clients;
|
||||
atomic_uint http_snapshot_requested;
|
||||
atomic_ullong http_last_request_ts; // Seconds
|
||||
atomic_ullong http_capture_state; // Bits
|
||||
us_fpsi_s *http_captured_fpsi;
|
||||
|
||||
us_blank_s *blank;
|
||||
|
||||
@ -89,5 +90,3 @@ void us_stream_destroy(us_stream_s *stream);
|
||||
|
||||
void us_stream_loop(us_stream_s *stream);
|
||||
void us_stream_loop_break(us_stream_s *stream);
|
||||
|
||||
void us_stream_get_capture_state(us_stream_s *stream, uint *width, uint *height, bool *online, uint *captured_fps);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user