mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
Use a separate field for stream key in custom streaming
This commit is contained in:
2
TODO
2
TODO
@@ -208,4 +208,4 @@ Support localization.
|
|||||||
|
|
||||||
Add option to not capture cursor in screenshot when doing region/window capture.
|
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.
|
Window selection doesn't work when a window is fullscreen on x11.
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ namespace gsr {
|
|||||||
|
|
||||||
struct CustomStreamConfig {
|
struct CustomStreamConfig {
|
||||||
std::string url;
|
std::string url;
|
||||||
|
std::string key;
|
||||||
std::string container = "flv";
|
std::string container = "flv";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace gsr {
|
|||||||
std::unique_ptr<ComboBox> create_streaming_service_box();
|
std::unique_ptr<ComboBox> create_streaming_service_box();
|
||||||
std::unique_ptr<List> create_streaming_service_section();
|
std::unique_ptr<List> create_streaming_service_section();
|
||||||
std::unique_ptr<List> create_stream_key_section();
|
std::unique_ptr<List> create_stream_key_section();
|
||||||
std::unique_ptr<List> create_stream_url_section();
|
std::unique_ptr<List> create_stream_custom_section();
|
||||||
std::unique_ptr<ComboBox> create_stream_container_box();
|
std::unique_ptr<ComboBox> create_stream_container_box();
|
||||||
std::unique_ptr<List> create_stream_container_section();
|
std::unique_ptr<List> create_stream_container_section();
|
||||||
void add_stream_widgets();
|
void add_stream_widgets();
|
||||||
@@ -192,6 +192,7 @@ namespace gsr {
|
|||||||
Entry *youtube_stream_key_entry_ptr = nullptr;
|
Entry *youtube_stream_key_entry_ptr = nullptr;
|
||||||
Entry *rumble_stream_key_entry_ptr = nullptr;
|
Entry *rumble_stream_key_entry_ptr = nullptr;
|
||||||
Entry *stream_url_entry_ptr = nullptr;
|
Entry *stream_url_entry_ptr = nullptr;
|
||||||
|
Entry *stream_key_entry_ptr = nullptr;
|
||||||
Entry *replay_time_entry_ptr = nullptr;
|
Entry *replay_time_entry_ptr = nullptr;
|
||||||
RadioButton *replay_storage_button_ptr = nullptr;
|
RadioButton *replay_storage_button_ptr = nullptr;
|
||||||
Label *replay_time_label_ptr = nullptr;
|
Label *replay_time_label_ptr = nullptr;
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ namespace gsr {
|
|||||||
{"streaming.twitch.key", &config.streaming_config.twitch.stream_key},
|
{"streaming.twitch.key", &config.streaming_config.twitch.stream_key},
|
||||||
{"streaming.rumble.key", &config.streaming_config.rumble.stream_key},
|
{"streaming.rumble.key", &config.streaming_config.rumble.stream_key},
|
||||||
{"streaming.custom.url", &config.streaming_config.custom.url},
|
{"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.custom.container", &config.streaming_config.custom.container},
|
||||||
{"streaming.start_stop_hotkey", &config.streaming_config.start_stop_hotkey},
|
{"streaming.start_stop_hotkey", &config.streaming_config.start_stop_hotkey},
|
||||||
|
|
||||||
|
|||||||
@@ -2875,6 +2875,11 @@ namespace gsr {
|
|||||||
{}
|
{}
|
||||||
else
|
else
|
||||||
url = "rtmp://" + url;
|
url = "rtmp://" + url;
|
||||||
|
|
||||||
|
if(!url.empty() && url.back() != '/' && url.back() != '=')
|
||||||
|
url += "/";
|
||||||
|
|
||||||
|
url += config.streaming_config.custom.key;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -985,14 +985,20 @@ namespace gsr {
|
|||||||
return stream_key_list;
|
return stream_key_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<List> SettingsPage::create_stream_url_section() {
|
std::unique_ptr<List> SettingsPage::create_stream_custom_section() {
|
||||||
auto stream_url_list = std::make_unique<List>(List::Orientation::VERTICAL);
|
auto stream_url_list = std::make_unique<List>(List::Orientation::VERTICAL);
|
||||||
stream_url_list->add_widget(std::make_unique<Label>(&get_theme().body_font, "URL:", get_color_theme().text_color));
|
stream_url_list->add_widget(std::make_unique<Label>(&get_theme().body_font, "Stream URL:", get_color_theme().text_color));
|
||||||
|
|
||||||
auto stream_url_entry = std::make_unique<Entry>(&get_theme().body_font, "", get_theme().body_font.get_character_size() * 20);
|
auto stream_url_entry = std::make_unique<Entry>(&get_theme().body_font, "", get_theme().body_font.get_character_size() * 20);
|
||||||
stream_url_entry_ptr = stream_url_entry.get();
|
stream_url_entry_ptr = stream_url_entry.get();
|
||||||
stream_url_list->add_widget(std::move(stream_url_entry));
|
stream_url_list->add_widget(std::move(stream_url_entry));
|
||||||
|
|
||||||
|
stream_url_list->add_widget(std::make_unique<Label>(&get_theme().body_font, "Stream key:", get_color_theme().text_color));
|
||||||
|
|
||||||
|
auto stream_key_entry = std::make_unique<Entry>(&get_theme().body_font, "", get_theme().body_font.get_character_size() * 20);
|
||||||
|
stream_key_entry_ptr = stream_key_entry.get();
|
||||||
|
stream_url_list->add_widget(std::move(stream_key_entry));
|
||||||
|
|
||||||
stream_url_list_ptr = stream_url_list.get();
|
stream_url_list_ptr = stream_url_list.get();
|
||||||
return stream_url_list;
|
return stream_url_list;
|
||||||
}
|
}
|
||||||
@@ -1019,7 +1025,7 @@ namespace gsr {
|
|||||||
auto streaming_info_list = std::make_unique<List>(List::Orientation::HORIZONTAL);
|
auto streaming_info_list = std::make_unique<List>(List::Orientation::HORIZONTAL);
|
||||||
streaming_info_list->add_widget(create_streaming_service_section());
|
streaming_info_list->add_widget(create_streaming_service_section());
|
||||||
streaming_info_list->add_widget(create_stream_key_section());
|
streaming_info_list->add_widget(create_stream_key_section());
|
||||||
streaming_info_list->add_widget(create_stream_url_section());
|
streaming_info_list->add_widget(create_stream_custom_section());
|
||||||
streaming_info_list->add_widget(create_stream_container_section());
|
streaming_info_list->add_widget(create_stream_container_section());
|
||||||
settings_list_ptr->add_widget(std::make_unique<Subsection>("Streaming info", std::move(streaming_info_list), mgl::vec2f(settings_scrollable_page_ptr->get_inner_size().x, 0.0f)));
|
settings_list_ptr->add_widget(std::make_unique<Subsection>("Streaming info", std::move(streaming_info_list), mgl::vec2f(settings_scrollable_page_ptr->get_inner_size().x, 0.0f)));
|
||||||
|
|
||||||
@@ -1253,6 +1259,7 @@ namespace gsr {
|
|||||||
twitch_stream_key_entry_ptr->set_text(config.streaming_config.twitch.stream_key);
|
twitch_stream_key_entry_ptr->set_text(config.streaming_config.twitch.stream_key);
|
||||||
rumble_stream_key_entry_ptr->set_text(config.streaming_config.rumble.stream_key);
|
rumble_stream_key_entry_ptr->set_text(config.streaming_config.rumble.stream_key);
|
||||||
stream_url_entry_ptr->set_text(config.streaming_config.custom.url);
|
stream_url_entry_ptr->set_text(config.streaming_config.custom.url);
|
||||||
|
stream_key_entry_ptr->set_text(config.streaming_config.custom.key);
|
||||||
container_box_ptr->set_selected_item(config.streaming_config.custom.container);
|
container_box_ptr->set_selected_item(config.streaming_config.custom.container);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1395,6 +1402,7 @@ namespace gsr {
|
|||||||
config.streaming_config.twitch.stream_key = twitch_stream_key_entry_ptr->get_text();
|
config.streaming_config.twitch.stream_key = twitch_stream_key_entry_ptr->get_text();
|
||||||
config.streaming_config.rumble.stream_key = rumble_stream_key_entry_ptr->get_text();
|
config.streaming_config.rumble.stream_key = rumble_stream_key_entry_ptr->get_text();
|
||||||
config.streaming_config.custom.url = stream_url_entry_ptr->get_text();
|
config.streaming_config.custom.url = stream_url_entry_ptr->get_text();
|
||||||
|
config.streaming_config.custom.key = stream_key_entry_ptr->get_text();
|
||||||
config.streaming_config.custom.container = container_box_ptr->get_selected_id();
|
config.streaming_config.custom.container = container_box_ptr->get_selected_id();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user