-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (31 loc) · 1008 Bytes
/
main.cpp
File metadata and controls
35 lines (31 loc) · 1008 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
28
29
30
31
32
33
34
35
#include <brewtils/env.h>
#include <yt-storage/decrypter.h>
#include <yt-storage/encrypter.h>
int main(int argc, char **argv) {
yt::options options;
int mode = std::stoi(brewtils::env::get("MODE", "0"));
options.inputFile = brewtils::env::get("INPUT_FILE");
if (options.inputFile.empty()) {
logger::error("Input file not provided", "int main(int argc, char **argv)");
}
switch (mode) {
case 0: {
options.width = std::stoi(brewtils::env::get("WIDTH", "1920"));
options.height = std::stoi(brewtils::env::get("HEIGHT", "1080"));
options.fps = std::stoi(brewtils::env::get("FPS", "30"));
options.outputFile = brewtils::env::get("OUTPUT_FILE", "output.mp4");
yt::Encrypter encrypter;
encrypter.encrypt(options);
break;
}
case 1: {
yt::Decrypter decrypter;
decrypter.decrypt(options);
break;
}
default:
logger::error("Invalid mode: " + std::to_string(mode),
"int main(int argc, char **argv)");
}
return EXIT_SUCCESS;
}