UI: Support FTL URLs for custom streaming service
Custom streaming service URLs beginning with `ftl` are handled by the `ftl_output` plugin.
This commit is contained in:
@@ -45,6 +45,8 @@
|
||||
#define OPT_MAX_SHUTDOWN_TIME_SEC "max_shutdown_time_sec"
|
||||
#define OPT_BIND_IP "bind_ip"
|
||||
|
||||
#define FTL_URL_PROTOCOL "ftl://"
|
||||
|
||||
typedef struct _nalu_t {
|
||||
int len;
|
||||
int dts_usec;
|
||||
@@ -1020,7 +1022,7 @@ static int init_connect(struct ftl_stream *stream)
|
||||
{
|
||||
obs_service_t *service;
|
||||
obs_data_t *settings;
|
||||
const char *bind_ip, *key;
|
||||
const char *bind_ip, *key, *ingest_url;
|
||||
ftl_status_t status_code;
|
||||
|
||||
info("init_connect");
|
||||
@@ -1046,7 +1048,14 @@ static int init_connect(struct ftl_stream *stream)
|
||||
obs_output_get_video_encoder(stream->output);
|
||||
obs_data_t *video_settings = obs_encoder_get_settings(video_encoder);
|
||||
|
||||
dstr_copy(&stream->path, obs_service_get_url(service));
|
||||
ingest_url = obs_service_get_url(service);
|
||||
if (strncmp(ingest_url, FTL_URL_PROTOCOL, strlen(FTL_URL_PROTOCOL)) ==
|
||||
0) {
|
||||
dstr_copy(&stream->path, ingest_url + strlen(FTL_URL_PROTOCOL));
|
||||
} else {
|
||||
dstr_copy(&stream->path, ingest_url);
|
||||
}
|
||||
|
||||
key = obs_service_get_key(service);
|
||||
|
||||
int target_bitrate = (int)obs_data_get_int(video_settings, "bitrate");
|
||||
|
Reference in New Issue
Block a user