feat: video reconnect cli arg

This commit is contained in:
2026-05-11 08:36:32 +02:00
parent 7d99c617ef
commit dfefe879c9
4 changed files with 34 additions and 8 deletions
+9 -4
View File
@@ -121,6 +121,9 @@ static bool start_video_captures(unsigned int video_count, bool trace_fps) {
return false;
}
}
if (!init_params.video_reconnect) {
return true;
}
pid = fork();
if (pid < 0) {
log_error("Could not create subprocess");
@@ -268,10 +271,12 @@ static bool loop(bool hr, bool trace_fps) {
}
#ifdef VIDEO_IN
for (unsigned int i = 0; i < context->inputs.length; i++) {
if (context->inputs.values[i].needs_reload) {
shaders_relink_input(&program, &project, &context->inputs, i);
context->inputs.values[i].needs_reload = false;
if (init_params.video_reconnect) {
for (unsigned int i = 0; i < context->inputs.length; i++) {
if (context->inputs.values[i].needs_reload) {
shaders_relink_input(&program, &project, &context->inputs, i);
context->inputs.values[i].needs_reload = false;
}
}
}
#endif /* VIDEO_IN */