diff --git a/TODO b/TODO index fc03a7f..eab96a0 100644 --- a/TODO +++ b/TODO @@ -208,4 +208,4 @@ Support localization. Add option to not capture cursor in screenshot when doing region/window capture. -Window selection doesn't work when a window is fullscreen on x11. \ No newline at end of file +Window selection doesn't work when a window is fullscreen on x11. diff --git a/include/Config.hpp b/include/Config.hpp index ec24572..7fb9734 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -85,6 +85,7 @@ namespace gsr { struct CustomStreamConfig { std::string url; + std::string key; std::string container = "flv"; }; diff --git a/include/gui/SettingsPage.hpp b/include/gui/SettingsPage.hpp index 1810de5..9730d98 100644 --- a/include/gui/SettingsPage.hpp +++ b/include/gui/SettingsPage.hpp @@ -118,7 +118,7 @@ namespace gsr { std::unique_ptr create_streaming_service_box(); std::unique_ptr create_streaming_service_section(); std::unique_ptr create_stream_key_section(); - std::unique_ptr create_stream_url_section(); + std::unique_ptr create_stream_custom_section(); std::unique_ptr create_stream_container_box(); std::unique_ptr create_stream_container_section(); void add_stream_widgets(); @@ -192,6 +192,7 @@ namespace gsr { Entry *youtube_stream_key_entry_ptr = nullptr; Entry *rumble_stream_key_entry_ptr = nullptr; Entry *stream_url_entry_ptr = nullptr; + Entry *stream_key_entry_ptr = nullptr; Entry *replay_time_entry_ptr = nullptr; RadioButton *replay_storage_button_ptr = nullptr; Label *replay_time_label_ptr = nullptr; diff --git a/src/Config.cpp b/src/Config.cpp index 28c9e68..cd0f232 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -204,6 +204,7 @@ namespace gsr { {"streaming.twitch.key", &config.streaming_config.twitch.stream_key}, {"streaming.rumble.key", &config.streaming_config.rumble.stream_key}, {"streaming.custom.url", &config.streaming_config.custom.url}, + {"streaming.custom.key", &config.streaming_config.custom.key}, {"streaming.custom.container", &config.streaming_config.custom.container}, {"streaming.start_stop_hotkey", &config.streaming_config.start_stop_hotkey}, diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 7acdb20..5896be9 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -2875,6 +2875,11 @@ namespace gsr { {} else url = "rtmp://" + url; + + if(!url.empty() && url.back() != '/' && url.back() != '=') + url += "/"; + + url += config.streaming_config.custom.key; } return url; } diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp index 405ba28..d68f7f3 100644 --- a/src/gui/SettingsPage.cpp +++ b/src/gui/SettingsPage.cpp @@ -985,14 +985,20 @@ namespace gsr { return stream_key_list; } - std::unique_ptr SettingsPage::create_stream_url_section() { + std::unique_ptr SettingsPage::create_stream_custom_section() { auto stream_url_list = std::make_unique(List::Orientation::VERTICAL); - stream_url_list->add_widget(std::make_unique