mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-11 18:13:41 +00:00
ustreamer-v4p: bring back busy message
This commit is contained in:
@@ -337,12 +337,7 @@ int us_drm_expose_stub(us_drm_s *drm, us_drm_stub_e stub, const us_capture_s *ca
|
|||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
case US_DRM_STUB_BAD_FORMAT:
|
case US_DRM_STUB_BAD_FORMAT:
|
||||||
DRAW_MSG(
|
DRAW_MSG("=== PiKVM ===\n \n< UNSUPPORTED CAPTURE FORMAT >");
|
||||||
"=== PiKVM ==="
|
|
||||||
"\n \n< UNSUPPORTED CAPTURE FORMAT >"
|
|
||||||
"\n \nIt shouldn't happen ever."
|
|
||||||
"\n \nPlease check the logs and report a bug:"
|
|
||||||
"\n \n- https://github.com/pikvm/pikvm -");
|
|
||||||
break;
|
break;
|
||||||
case US_DRM_STUB_NO_SIGNAL:
|
case US_DRM_STUB_NO_SIGNAL:
|
||||||
DRAW_MSG("=== PiKVM ===\n \n< NO SIGNAL >");
|
DRAW_MSG("=== PiKVM ===\n \n< NO SIGNAL >");
|
||||||
|
|||||||
@@ -177,17 +177,19 @@ static void _main_loop(void) {
|
|||||||
while (!atomic_load(&_g_stop)) {
|
while (!atomic_load(&_g_stop)) {
|
||||||
# define CHECK(x_arg) if ((x_arg) < 0) { goto close; }
|
# define CHECK(x_arg) if ((x_arg) < 0) { goto close; }
|
||||||
|
|
||||||
if (atomic_load(&_g_ustreamer_online)) {
|
|
||||||
blank_at_ts = 0;
|
|
||||||
US_ONCE({ US_LOG_INFO("DRM: Online stream is active, pausing the service ..."); });
|
|
||||||
goto close;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (drm_opened <= 0) {
|
if (drm_opened <= 0) {
|
||||||
blank_at_ts = 0;
|
blank_at_ts = 0;
|
||||||
CHECK(drm_opened = us_drm_open(drm, NULL));
|
CHECK(drm_opened = us_drm_open(drm, NULL));
|
||||||
}
|
}
|
||||||
assert(drm_opened > 0);
|
|
||||||
|
if (atomic_load(&_g_ustreamer_online)) {
|
||||||
|
blank_at_ts = 0;
|
||||||
|
US_ONCE({ US_LOG_INFO("DRM: Online stream is active, pausing the service ..."); });
|
||||||
|
CHECK(us_drm_wait_for_vsync(drm));
|
||||||
|
CHECK(us_drm_expose_stub(drm, US_DRM_STUB_BUSY, NULL));
|
||||||
|
_slowdown();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (us_capture_open(cap) < 0) {
|
if (us_capture_open(cap) < 0) {
|
||||||
ldf now_ts = us_get_now_monotonic();
|
ldf now_ts = us_get_now_monotonic();
|
||||||
|
|||||||
Reference in New Issue
Block a user