diff options
Diffstat (limited to 'include/Config.hpp')
-rw-r--r-- | include/Config.hpp | 61 |
1 files changed, 55 insertions, 6 deletions
diff --git a/include/Config.hpp b/include/Config.hpp index 34c2010..7c2aeda 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -6,17 +6,36 @@ #include <vector> #include <optional> -#define GSR_CONFIG_FILE_VERSION 1 +#define GSR_CONFIG_FILE_VERSION 2 namespace gsr { struct SupportedCaptureOptions; + enum class ReplayStartupMode { + DONT_TURN_ON_AUTOMATICALLY, + TURN_ON_AT_SYSTEM_STARTUP, + TURN_ON_AT_FULLSCREEN, + TURN_ON_AT_POWER_SUPPLY_CONNECTED + }; + + ReplayStartupMode replay_startup_string_to_type(const char *startup_mode_str); + struct ConfigHotkey { int64_t key = 0; // Mgl key uint32_t modifiers = 0; // HotkeyModifier bool operator==(const ConfigHotkey &other) const; bool operator!=(const ConfigHotkey &other) const; + + std::string to_string(bool spaces = true, bool modifier_side = true) const; + }; + + struct AudioTrack { + std::vector<std::string> audio_inputs; // ids + bool application_audio_invert = false; + + bool operator==(const AudioTrack &other) const; + bool operator!=(const AudioTrack &other) const; }; struct RecordOptions { @@ -26,16 +45,17 @@ namespace gsr { int32_t video_width = 0; int32_t video_height = 0; int32_t fps = 60; - int32_t video_bitrate = 15000; - bool merge_audio_tracks = true; // Currently unused for streaming because all known streaming sites only support 1 audio track - bool application_audio_invert = false; + int32_t video_bitrate = 8000; + bool merge_audio_tracks = true; // TODO: Remove in the future + bool application_audio_invert = false; // TODO: Remove in the future bool change_video_resolution = false; - std::vector<std::string> audio_tracks; + std::vector<std::string> audio_tracks; // ids, TODO: Remove in the future + std::vector<AudioTrack> audio_tracks_list; std::string color_range = "limited"; std::string video_quality = "very_high"; std::string video_codec = "auto"; std::string audio_codec = "opus"; - std::string framerate_mode = "vfr"; + std::string framerate_mode = "auto"; bool advanced_view = false; bool overclock = false; bool record_cursor = true; @@ -59,6 +79,10 @@ namespace gsr { std::string stream_key; }; + struct RumbleStreamConfig { + std::string stream_key; + }; + struct CustomStreamConfig { std::string url; std::string container = "flv"; @@ -71,6 +95,7 @@ namespace gsr { std::string streaming_service = "twitch"; YoutubeStreamConfig youtube; TwitchStreamConfig twitch; + RumbleStreamConfig rumble; CustomStreamConfig custom; ConfigHotkey start_stop_hotkey; }; @@ -80,6 +105,7 @@ namespace gsr { bool save_video_in_game_folder = false; bool show_recording_started_notifications = true; bool show_video_saved_notifications = true; + bool show_video_paused_notifications = true; std::string save_directory; std::string container = "mp4"; ConfigHotkey start_stop_hotkey; @@ -97,8 +123,28 @@ namespace gsr { std::string save_directory; std::string container = "mp4"; int32_t replay_time = 60; + std::string replay_storage = "ram"; ConfigHotkey start_stop_hotkey; ConfigHotkey save_hotkey; + ConfigHotkey save_1_min_hotkey; + ConfigHotkey save_10_min_hotkey; + }; + + struct ScreenshotConfig { + std::string record_area_option = "screen"; + int32_t image_width = 0; + int32_t image_height = 0; + bool change_image_resolution = false; + std::string image_quality = "very_high"; + std::string image_format = "jpg"; + bool record_cursor = true; + bool restore_portal_session = true; + + bool save_screenshot_in_game_folder = false; + bool show_screenshot_saved_notifications = true; + std::string save_directory; + ConfigHotkey take_screenshot_hotkey; + ConfigHotkey take_screenshot_region_hotkey; }; struct Config { @@ -106,10 +152,13 @@ namespace gsr { bool operator==(const Config &other); bool operator!=(const Config &other); + void set_hotkeys_to_default(); + MainConfig main_config; StreamingConfig streaming_config; RecordConfig record_config; ReplayConfig replay_config; + ScreenshotConfig screenshot_config; }; std::optional<Config> read_config(const SupportedCaptureOptions &capture_options); |