@@ -50,15 +50,16 @@ namespace cli {
5050namespace {
5151
5252// NOLINTNEXTLINE(cert-err58-cpp)
53- const std::string short_options = " i:g:l:n:o:s:t:b:" ;
54- const std::array<struct option , 10 > long_options{{{" input" , required_argument, nullptr , ' i' },
53+ const std::string short_options = " i:g:l:n:o:s:t:b:d: " ;
54+ const std::array<struct option , 11 > long_options{{{" input" , required_argument, nullptr , ' i' },
5555 {" output" , required_argument, nullptr , ' o' },
5656 {" frames" , required_argument, nullptr , ' n' },
5757 {" start-frame" , required_argument, nullptr , ' s' },
5858 {" geo-precision" , required_argument, nullptr , ' g' },
5959 {" threads" , required_argument, nullptr , ' t' },
6060 {" uvgvpcc" , required_argument, nullptr , 0 },
6161 {" loop-input" , required_argument, nullptr , ' l' },
62+ {" dummy-run" , required_argument, nullptr , ' d' },
6263 {" help" , no_argument, nullptr , 0 },
6364 {" version" , no_argument, nullptr , 0 }}};
6465
@@ -120,7 +121,6 @@ size_t select_start_frame_auto(std::string& file_name) {
120121// / @brief Parse command line options
121122// / @return True if the execution should end (for exemple if the flag --help is used).
122123bool opts_parse (cli::opts_t & opts, const int & argc, const std::span<const char * const >& args) {
123-
124124 for (optind = 0 ;;) {
125125 int long_options_index = -1 ;
126126
@@ -175,11 +175,14 @@ bool opts_parse(cli::opts_t& opts, const int& argc, const std::span<const char*
175175 } else if (name == " version" ) {
176176 cli::print_version ();
177177 return true ;
178+ } else if (name == " dummy-run" ) {
179+ opts.dummyRun = static_cast <bool >(std::stoi (optarg));
178180 } else if (name == " help" ) {
179181 cli::print_help ();
180182 return true ;
181183 }
182184 }
185+
183186 // Check for extra arguments.
184187 if (args.size () - optind > 0 ) {
185188 throw std::runtime_error (" Input error: Extra argument found: " + std::string (args[optind]) + " ." );
@@ -247,6 +250,7 @@ void print_help(void) {
247250 std::cout << " -g, --geo-precision <number> Geometry precision for encoding\n " ;
248251 std::cout << " -t, --threads <number> Maximum number of threads to be used\n " ;
249252 std::cout << " -l, --loop-input <number> Number of input loop\n " ;
253+ std::cout << " -d, --dummy-run <number> Vverify config without encoding\n " ;
250254 std::cout << " --uvgvpcc <params> Encoder configuration parameters\n " ;
251255 std::cout << " --help Show this help message\n " ;
252256 std::cout << " --version Show version information\n " ;
0 commit comments