-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (25 loc) · 842 Bytes
/
Copy pathmain.cpp
File metadata and controls
27 lines (25 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include "app/cli.hpp"
#include "core/transcoder.hpp"
#include "util/logging.hpp"
int main(int argc, char** argv)
{
try {
auto cli = htj2k::app::parse_cli(argc, argv);
if (cli.show_help) {
std::cout << htj2k::app::usage_text();
return 0;
}
// Multi-frame encapsulation memory behavior is only exercised when the input
// corpus contains real multi-frame cine/volume datasets.
cli.options.benchmark_mode = true;
htj2k::util::set_log_level(cli.options.log_level);
htj2k::core::Transcoder transcoder(htj2k::app::current_build_info(), cli.options);
const auto report = transcoder.run();
std::cout << report.summary_text() << '\n';
return report.exit_code();
} catch (const std::exception& ex) {
std::cerr << "fatal: " << ex.what() << '\n';
return 2;
}
}