aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Config.hpp2
-rw-r--r--src/Config.cpp4
-rw-r--r--src/Overlay.cpp1
-rw-r--r--src/Process.cpp13
-rw-r--r--src/gui/SettingsPage.cpp9
5 files changed, 25 insertions, 4 deletions
diff --git a/include/Config.hpp b/include/Config.hpp
index 0d2c822..5766009 100644
--- a/include/Config.hpp
+++ b/include/Config.hpp
@@ -83,6 +83,8 @@ namespace gsr {
};
struct Config {
+ Config();
+
MainConfig main_config;
StreamingConfig streaming_config;
RecordConfig record_config;
diff --git a/src/Config.cpp b/src/Config.cpp
index 2f99625..ec2f777 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -12,6 +12,10 @@
#define CONFIG_FILE_VERSION 1
namespace gsr {
+ Config::Config() {
+ streaming_config.record_options.video_quality = "custom";
+ }
+
static std::optional<KeyValue> parse_key_value(std::string_view line) {
const size_t space_index = line.find(' ');
if(space_index == std::string_view::npos)
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 34988f1..ece6030 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -731,7 +731,6 @@ namespace gsr {
"-cursor", config->record_config.record_options.record_cursor ? "yes" : "no",
"-cr", config->record_config.record_options.color_range.c_str(),
"-fm", framerate_mode.c_str(),
- "-q", config->record_config.record_options.video_quality.c_str(),
"-k", config->record_config.record_options.video_codec.c_str(),
"-f", fps.c_str(),
"-o", output_file.c_str()
diff --git a/src/Process.cpp b/src/Process.cpp
index 822e82e..f9c896c 100644
--- a/src/Process.cpp
+++ b/src/Process.cpp
@@ -10,11 +10,22 @@
#include <stdlib.h>
namespace gsr {
+ static void debug_print_args(const char **args) {
+ fprintf(stderr, "gsr-overlay info: running command:");
+ while(*args) {
+ fprintf(stderr, " %s", *args);
+ ++args;
+ }
+ fprintf(stderr, "\n");
+ }
+
bool exec_program_daemonized(const char **args) {
/* 1 argument */
if(args[0] == nullptr)
return false;
+ debug_print_args(args);
+
pid_t pid = vfork();
if(pid == -1) {
perror("Failed to vfork");
@@ -45,6 +56,8 @@ namespace gsr {
if(args[0] == nullptr)
return -1;
+ debug_print_args(args);
+
pid_t pid = vfork();
if(pid == -1) {
perror("Failed to vfork");
diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp
index 2e7035b..8b06499 100644
--- a/src/gui/SettingsPage.cpp
+++ b/src/gui/SettingsPage.cpp
@@ -195,12 +195,15 @@ namespace gsr {
list->add_widget(std::make_unique<Label>(&get_theme().body_font, "Video quality:", get_theme().text_color));
auto video_quality_box = std::make_unique<ComboBox>(&get_theme().body_font);
- video_quality_box->add_item("Custom (Constant bitrate)", "custom");
+ video_quality_box->add_item("Custom (Constant bitrate, recommended for live streaming)", "custom");
video_quality_box->add_item("Medium", "medium");
- video_quality_box->add_item("High (Recommended for live streaming)", "high");
+ video_quality_box->add_item("High", "high");
video_quality_box->add_item("Very high (Recommended)", "very_high");
video_quality_box->add_item("Ultra", "ultra");
- video_quality_box->set_selected_item("very_high");
+ if(type == Type::STREAM)
+ video_quality_box->set_selected_item("custom");
+ else
+ video_quality_box->set_selected_item("very_high");
video_quality_box_ptr = video_quality_box.get();
list->add_widget(std::move(video_quality_box));