Преглед изворни кода

rtmp-services: Add stream key link URLs

This commit adds the stream key link URLs to services that have them
from UI/window-basic-auto-config.cpp and
UI/window-basic-settings-stream.cpp. This will enable querying these
values from services.json and remove service-specific code from UI code.
Ryan Foster пре 4 година
родитељ
комит
97e1d6ebf1
2 измењених фајлова са 24 додато и 0 уклоњено
  1. 13 0
      plugins/rtmp-services/data/services.json
  2. 11 0
      plugins/rtmp-services/rtmp-common.c

+ 13 - 0
plugins/rtmp-services/data/services.json

@@ -4,6 +4,7 @@
         {
             "name": "Twitch",
             "common": true,
+            "stream_key_link": "https://dashboard.twitch.tv/settings/stream",
             "servers": [
                 {
                     "name": "Asia: Hong Kong",
@@ -201,6 +202,7 @@
             "name": "YouTube - HLS",
             "common": false,
             "more_info_link": "https://developers.google.com/youtube/v3/live/guides/ingestion-protocol-comparison",
+            "stream_key_link": "https://www.youtube.com/live_dashboard",
             "servers": [
                 {
                     "name": "Primary YouTube ingest server",
@@ -221,6 +223,7 @@
         {
             "name": "YouTube - RTMPS",
             "common": true,
+            "stream_key_link": "https://www.youtube.com/live_dashboard",
             "alt_names": [
                 "YouTube / YouTube Gaming",
                 "YouTube - RTMP",
@@ -306,6 +309,7 @@
         },
         {
             "name": "Luzento.com - RTMP",
+            "stream_key_link": "https://cms.luzento.com/dashboard/stream-key?from=OBS",
             "servers": [
                 {
                     "name": "Primary",
@@ -384,6 +388,7 @@
         },
         {
             "name": "YouStreamer",
+            "stream_key_link": "https://www.app.youstreamer.com/stream/",
             "servers": [
                 {
                     "name": "Moscow",
@@ -478,6 +483,7 @@
         {
             "name": "Facebook Live",
             "common": true,
+            "stream_key_link": "https://www.facebook.com/live/producer?ref=OBS",
             "servers": [
                 {
                     "name": "Default",
@@ -547,6 +553,7 @@
                 "Restream.io - FTL"
             ],
             "common": true,
+            "stream_key_link": "https://restream.io/settings/streaming-setup?from=OBS",
             "servers": [
                 {
                     "name": "Autodetect",
@@ -1092,6 +1099,7 @@
         {
             "name": "Twitter",
             "common": true,
+            "stream_key_link": "https://studio.twitter.com/producer/sources",
             "alt_names": [
                 "Twitter / Periscope"
             ],
@@ -1306,6 +1314,7 @@
         {
             "name": "Trovo",
             "alt_names": ["Madcat"],
+            "stream_key_link": "https://studio.trovo.live/mychannel/stream",
             "servers": [
                 {
                     "name": "Default",
@@ -2054,6 +2063,7 @@
         },
         {
             "name": "Glimesh",
+            "stream_key_link": "https://glimesh.tv/users/settings/stream",
             "servers": [
                 {
                     "name": "North America - Chicago, United States",
@@ -2103,6 +2113,7 @@
         },
         {
             "name": "OPENREC.tv - Premium member (プレミアム会員)",
+            "stream_key_link": "https://www.openrec.tv/login?keep_login=true&url=https://www.openrec.tv/dashboard/live?from=obs",
             "servers": [
                 {
                     "name": "Default",
@@ -2201,6 +2212,7 @@
         },
         {
             "name": "Brime Live",
+            "stream_key_link": "https://brimelive.com/obs-stream-key-link",
             "servers": [
                 {
                     "name": "North America - Ashburn, VA",
@@ -2259,6 +2271,7 @@
         },
         {
             "name": "Bilibili Live",
+            "stream_key_link": "https://link.bilibili.com/p/center/index#/my-room/start-live",
             "servers": [
                 {
                     "name": "Default",

+ 11 - 0
plugins/rtmp-services/rtmp-common.c

@@ -424,6 +424,16 @@ static void fill_more_info_link(json_t *service, obs_data_t *settings)
 		obs_data_set_string(settings, "more_info_link", more_info_link);
 }
 
+static void fill_stream_key_link(json_t *service, obs_data_t *settings)
+{
+	const char *stream_key_link;
+
+	stream_key_link = get_string_val(service, "stream_key_link");
+	if (stream_key_link)
+		obs_data_set_string(settings, "stream_key_link",
+				    stream_key_link);
+}
+
 static inline json_t *find_service(json_t *root, const char *name,
 				   const char **p_new_name)
 {
@@ -487,6 +497,7 @@ static bool service_selected(obs_properties_t *props, obs_property_t *p,
 
 	fill_servers(obs_properties_get(props, "server"), service, name);
 	fill_more_info_link(service, settings);
+	fill_stream_key_link(service, settings);
 	return true;
 }