aboutsummaryrefslogtreecommitdiff
path: root/src/config.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-02-10 00:39:29 +0100
committerdec05eba <dec05eba@protonmail.com>2024-02-10 00:39:29 +0100
commitd5435fc8f6d8013209df40fdbf78ed9e044822eb (patch)
treec8257a0a64961d7bb152c45d38cc780c2d57ed73 /src/config.hpp
parent4268383f0f79c01db2d1f9b5c1d9ab1cc097efae (diff)
Add color range option
Diffstat (limited to 'src/config.hpp')
-rw-r--r--src/config.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp
index b82f4fb..85bb829 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -26,6 +26,7 @@ struct MainConfig {
int fps = 60;
bool merge_audio_tracks = true;
std::vector<std::string> audio_input;
+ std::string color_range;
std::string quality;
std::string codec; // Video codec
std::string audio_codec;
@@ -316,6 +317,8 @@ static Config read_config(bool &config_empty) {
config.main_config.merge_audio_tracks = false;
} else if(key == "main.audio_input") {
config.main_config.audio_input.emplace_back(value.str, value.size);
+ } else if(key == "main.color_range") {
+ config.main_config.color_range.assign(value.str, value.size);
} else if(key == "main.quality") {
config.main_config.quality.assign(value.str, value.size);
} else if(key == "main.codec") {
@@ -427,6 +430,7 @@ static void save_config(const Config &config) {
for(const std::string &audio_input : config.main_config.audio_input) {
fprintf(file, "main.audio_input %s\n", audio_input.c_str());
}
+ fprintf(file, "main.color_range %s\n", config.main_config.color_range.c_str());
fprintf(file, "main.quality %s\n", config.main_config.quality.c_str());
fprintf(file, "main.codec %s\n", config.main_config.codec.c_str());
fprintf(file, "main.audio_codec %s\n", config.main_config.audio_codec.c_str());