Selaa lähdekoodia

libobs: Add bearer token to obs_service_connect_info

This adds a new OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN which is needed for WHIP output.

Signed-off-by: pkv <[email protected]>
Sean DuBois 2 vuotta sitten
vanhempi
sitoutus
ed577a05aa

+ 1 - 0
libobs/obs-service.h

@@ -42,6 +42,7 @@ enum obs_service_connect_info {
 	OBS_SERVICE_CONNECT_INFO_USERNAME = 4,
 	OBS_SERVICE_CONNECT_INFO_PASSWORD = 6,
 	OBS_SERVICE_CONNECT_INFO_ENCRYPT_PASSPHRASE = 8,
+	OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN = 10,
 };
 
 struct obs_service_info {

+ 3 - 2
plugins/rtmp-services/data/schema/service-schema-v5.json

@@ -25,7 +25,8 @@
                             "HLS",
                             "FTL",
                             "SRT",
-                            "RIST"
+                            "RIST",
+                            "WHIP",
                         ]
                     },
                     "common": {
@@ -222,7 +223,7 @@
                     },
                     {
                         "$comment": "Require recommended output field if protocol field is not RTMP(S)",
-                        "if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST|FTL)$" } } },
+                        "if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST|FTL|WHIP)$" } } },
                         "then": { "properties": { "recommended": { "required": ["output"] } } }
                     }
                 ]

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

@@ -1086,6 +1086,8 @@ static const char *rtmp_common_get_connect_info(void *data, uint32_t type)
 
 		break;
 	}
+	case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN:
+		return NULL;
 	}
 
 	return NULL;

+ 2 - 0
plugins/rtmp-services/rtmp-custom.c

@@ -169,6 +169,8 @@ static const char *rtmp_custom_get_connect_info(void *data, uint32_t type)
 
 		break;
 	}
+	case OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN:
+		return NULL;
 	}
 
 	return NULL;