-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
48 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
#include "cli.h" | ||
|
||
int main(int argc, char* argv[]) { | ||
CLI::App app{"Add motion blur to videos"}; | ||
|
||
std::vector<std::string> inputs; | ||
std::vector<std::string> outputs; | ||
std::vector<std::string> configPaths; | ||
bool preview = false; | ||
bool verbose = false; | ||
CLI::App app{ "Add motion blur to videos" }; | ||
|
||
app.add_option("-i,--input", inputs, "Input file name(s)") | ||
->required(); | ||
app.add_option("-o,--output", outputs, "Output file name(s) (optional)"); | ||
app.add_option("-c,--config-path", configPaths, "Manual configuration file path(s) (optional)"); | ||
app.add_flag("-p,--preview", preview, "Enable preview"); | ||
app.add_flag("-v,--verbose", verbose, "Verbose mode"); | ||
std::vector<std::string> inputs; | ||
std::vector<std::string> outputs; | ||
std::vector<std::string> configPaths; | ||
bool preview = false; | ||
bool verbose = false; | ||
|
||
try { | ||
CLI11_PARSE(app, argc, argv); | ||
|
||
cli::run(inputs, outputs, configPaths, preview, verbose); | ||
app.add_option("-i,--input", inputs, "Input file name(s)") | ||
->required(); | ||
app.add_option("-o,--output", outputs, "Output file name(s) (optional)"); | ||
app.add_option("-c,--config-path", configPaths, "Manual configuration file path(s) (optional)"); | ||
app.add_flag("-p,--preview", preview, "Enable preview"); | ||
app.add_flag("-v,--verbose", verbose, "Verbose mode"); | ||
|
||
return 0; | ||
} | ||
catch (const CLI::ParseError &e) { | ||
std::cout << "Failed to parse arguments, use -h or --help for help." << std::endl; | ||
return 1; | ||
} | ||
} | ||
try { | ||
CLI11_PARSE(app, argc, argv); | ||
|
||
cli::run(inputs, outputs, configPaths, preview, verbose); | ||
|
||
return 0; | ||
} | ||
catch (const CLI::ParseError& e) { | ||
std::cout << "Failed to parse arguments, use -h or --help for help." << std::endl; | ||
return 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ class c_blur { | |
void cleanup(); | ||
}; | ||
|
||
inline c_blur blur; | ||
inline c_blur blur; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters