feat: video reconnect cli arg
This commit is contained in:
+16
@@ -32,6 +32,7 @@ static void print_help(int status_code) {
|
||||
#ifdef VIDEO_IN
|
||||
"[-vi=FILE] "
|
||||
"[-vs=SIZE] "
|
||||
"[-vr / -nvr] "
|
||||
#endif /* VIDEO_IN */
|
||||
"[-is=SIZE] "
|
||||
"[-ls / -nls] "
|
||||
@@ -63,6 +64,8 @@ static void print_help(int status_code) {
|
||||
"allowed)\n"
|
||||
" -vs, --video-size video capture desired height (default: "
|
||||
"internal texture height)\n"
|
||||
" -vr, --video-reconnect auto-reconnect video (default)\n"
|
||||
" -nvr, --no-video-reconnect do not auto-reconnect video\n"
|
||||
#endif /* VIDEO_IN */
|
||||
" -is, --internal-size internal texture height (default: 720)\n"
|
||||
" -ls, --load-state load saved state (default)\n"
|
||||
@@ -130,6 +133,7 @@ void args_parse(Parameters *params, int argc, char **argv) {
|
||||
params->auto_random_cycle = 4;
|
||||
params->video_in.length = 0;
|
||||
params->video_size = 0;
|
||||
params->video_reconnect = true;
|
||||
params->internal_size = 720;
|
||||
params->load_state = true;
|
||||
params->save_state = true;
|
||||
@@ -195,6 +199,18 @@ void args_parse(Parameters *params, int argc, char **argv) {
|
||||
}
|
||||
#else
|
||||
invalid_arg(arg);
|
||||
#endif /* VIDEO_IN */
|
||||
} else if (is_arg(arg, "-vr") || is_arg(arg, "--video-reconnect")) {
|
||||
#ifdef VIDEO_IN
|
||||
params->video_reconnect = true;
|
||||
#else
|
||||
invalid_arg(arg);
|
||||
#endif /* VIDEO_IN */
|
||||
} else if (is_arg(arg, "-nvr") || is_arg(arg, "--no-video-reconnect")) {
|
||||
#ifdef VIDEO_IN
|
||||
params->video_reconnect = false;
|
||||
#else
|
||||
invalid_arg(arg);
|
||||
#endif /* VIDEO_IN */
|
||||
} else if (is_arg(arg, "-is") || is_arg(arg, "--internal-size")) {
|
||||
params->internal_size = parse_uint(arg, value);
|
||||
|
||||
Reference in New Issue
Block a user