Skip to content

Commit

Permalink
scale the blank image for NO SIGNAL to the resolution in the options
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Müller authored and mdevaev committed Nov 7, 2024
1 parent 1f96925 commit 7902014
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ustreamer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
_g_server = us_server_init(_g_stream);

if ((exit_code = options_parse(options, cap, enc, _g_stream, _g_server)) == 0) {
us_stream_update_blank(cap);
# ifdef WITH_GPIO
us_gpio_init();
# endif
Expand Down
5 changes: 5 additions & 0 deletions src/ustreamer/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ us_stream_s *us_stream_init(us_capture_s *cap, us_encoder_s *enc) {
return stream;
}

void us_stream_update_blank(us_stream_s *stream, us_capture_s *cap)
{
us_blank_draw(stream->run->blank, "< NO SIGNAL >", cap->width, cap->height);
}

void us_stream_destroy(us_stream_s *stream) {
us_fpsi_destroy(stream->run->http->captured_fpsi);
US_RING_DELETE_WITH_ITEMS(stream->run->http->jpeg_ring, us_frame_destroy);
Expand Down
1 change: 1 addition & 0 deletions src/ustreamer/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ typedef struct {


us_stream_s *us_stream_init(us_capture_s *cap, us_encoder_s *enc);
void us_stream_update_blank(us_stream_s *stream, us_capture_s *cap);
void us_stream_destroy(us_stream_s *stream);

void us_stream_loop(us_stream_s *stream);
Expand Down

0 comments on commit 7902014

Please sign in to comment.