mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-27 12:48:13 +00:00
feat(video2x): use boost::po to validate the required options
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
7d10fa2814
commit
aecb16b467
@ -76,9 +76,11 @@ int parse_args(
|
||||
("list-devices,l", "List the available Vulkan devices (GPUs)")
|
||||
|
||||
// General Processing Options
|
||||
("input,i", PO_STR_VALUE<video2x::fsutils::StringType>(), "Input video file path")
|
||||
("output,o", PO_STR_VALUE<video2x::fsutils::StringType>(), "Output video file path")
|
||||
("processor,p", PO_STR_VALUE<video2x::fsutils::StringType>(),
|
||||
("input,i", PO_STR_VALUE<video2x::fsutils::StringType>()->required(),
|
||||
"Input video file path")
|
||||
("output,o", PO_STR_VALUE<video2x::fsutils::StringType>()->required(),
|
||||
"Output video file path")
|
||||
("processor,p", PO_STR_VALUE<video2x::fsutils::StringType>()->required(),
|
||||
"Processor to use (libplacebo, realesrgan, realcugan, rife)")
|
||||
("hwaccel,a", PO_STR_VALUE<video2x::fsutils::StringType>()
|
||||
->default_value(STR("none"), "none"), "Hardware acceleration method (decoding)")
|
||||
@ -201,7 +203,6 @@ int parse_args(
|
||||
#else
|
||||
po::store(po::command_line_parser(argc, argv).options(all_opts).run(), vm);
|
||||
#endif
|
||||
po::notify(vm);
|
||||
|
||||
if (vm.count("help") || argc == 1) {
|
||||
std::cout
|
||||
@ -236,6 +237,9 @@ int parse_args(
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Run all notify functions and validations
|
||||
po::notify(vm);
|
||||
|
||||
if (vm.count("log-level")) {
|
||||
if (!video2x::logger_manager::LoggerManager::instance().set_log_level(
|
||||
wstring_to_u8string(vm["log-level"].as<video2x::fsutils::StringType>())
|
||||
|
Loading…
Reference in New Issue
Block a user