Add kick streaming option

This commit is contained in:
dec05eba
2026-01-18 16:22:49 +01:00
parent aa717a95ec
commit 40b2af5668
6 changed files with 28 additions and 2 deletions

View File

@@ -213,6 +213,8 @@ namespace gsr {
{"streaming.youtube.key", &config.streaming_config.youtube.stream_key},
{"streaming.twitch.key", &config.streaming_config.twitch.stream_key},
{"streaming.rumble.key", &config.streaming_config.rumble.stream_key},
{"streaming.kick.url", &config.streaming_config.kick.stream_url},
{"streaming.kick.key", &config.streaming_config.kick.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},

View File

@@ -3146,6 +3146,7 @@ namespace gsr {
static std::string streaming_get_url(const Config &config) {
std::string url;
fprintf(stderr, "streaming service: %s\n", config.streaming_config.streaming_service.c_str());
if(config.streaming_config.streaming_service == "twitch") {
url += "rtmp://live.twitch.tv/app/";
url += config.streaming_config.twitch.stream_key;
@@ -3155,6 +3156,13 @@ namespace gsr {
} else if(config.streaming_config.streaming_service == "rumble") {
url += "rtmp://rtmp.rumble.com/live/";
url += config.streaming_config.rumble.stream_key;
} else if(config.streaming_config.streaming_service == "kick") {
fprintf(stderr, "kick: %s, %s\n", config.streaming_config.kick.stream_url.c_str(), config.streaming_config.kick.stream_key.c_str());
url += config.streaming_config.kick.stream_url;
if(!url.empty() && url.back() != '/')
url += "/";
url += "app/";
url += config.streaming_config.kick.stream_key;
} else if(config.streaming_config.streaming_service == "custom") {
url = config.streaming_config.custom.url;
if(url.size() >= 7 && strncmp(url.c_str(), "rtmp://", 7) == 0)

View File

@@ -1268,6 +1268,7 @@ namespace gsr {
streaming_service_box->add_item("Twitch", "twitch");
streaming_service_box->add_item("YouTube", "youtube");
streaming_service_box->add_item("Rumble", "rumble");
streaming_service_box->add_item("Kick", "kick");
streaming_service_box->add_item("Custom", "custom");
streaming_service_box_ptr = streaming_service_box.get();
return streaming_service_box;
@@ -1311,6 +1312,8 @@ namespace gsr {
twitch_stream_key_entry_ptr = add_stream_key_entry_to_list(stream_key_list.get());
youtube_stream_key_entry_ptr = add_stream_key_entry_to_list(stream_key_list.get());
rumble_stream_key_entry_ptr = add_stream_key_entry_to_list(stream_key_list.get());
kick_stream_url_entry_ptr = add_stream_key_entry_to_list(stream_key_list.get());
kick_stream_key_entry_ptr = add_stream_key_entry_to_list(stream_key_list.get());
stream_key_list_ptr = stream_key_list.get();
return stream_key_list;
@@ -1386,12 +1389,15 @@ namespace gsr {
const bool twitch_option = id == "twitch";
const bool youtube_option = id == "youtube";
const bool rumble_option = id == "rumble";
const bool kick_option = id == "kick";
const bool custom_option = id == "custom";
stream_key_list_ptr->set_visible(!custom_option);
custom_stream_list_ptr->set_visible(custom_option);
twitch_stream_key_entry_ptr->get_parent_widget()->set_visible(twitch_option);
youtube_stream_key_entry_ptr->get_parent_widget()->set_visible(youtube_option);
rumble_stream_key_entry_ptr->get_parent_widget()->set_visible(rumble_option);
kick_stream_url_entry_ptr->get_parent_widget()->set_visible(kick_option);
kick_stream_key_entry_ptr->get_parent_widget()->set_visible(kick_option);
return true;
};
streaming_service_box_ptr->on_selection_changed("Twitch", "twitch");
@@ -1603,6 +1609,8 @@ namespace gsr {
youtube_stream_key_entry_ptr->set_text(config.streaming_config.youtube.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);
kick_stream_url_entry_ptr->set_text(config.streaming_config.kick.stream_url);
kick_stream_key_entry_ptr->set_text(config.streaming_config.kick.stream_key);
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);
@@ -1752,6 +1760,8 @@ namespace gsr {
config.streaming_config.youtube.stream_key = youtube_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.kick.stream_url = kick_stream_url_entry_ptr->get_text();
config.streaming_config.kick.stream_key = kick_stream_key_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();