From 213eb613d3d276be30db1d8012162ced8b0d9288 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Fri, 7 Oct 2022 11:31:22 +0200 Subject: [PATCH] rtmp-services: Remove output getter from rtmp_common --- .../data/schema/service-schema-v4.json | 2 +- plugins/rtmp-services/rtmp-common.c | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/plugins/rtmp-services/data/schema/service-schema-v4.json b/plugins/rtmp-services/data/schema/service-schema-v4.json index e5afe4585..88b33abd3 100644 --- a/plugins/rtmp-services/data/schema/service-schema-v4.json +++ b/plugins/rtmp-services/data/schema/service-schema-v4.json @@ -118,7 +118,7 @@ }, "output": { "type": "string", - "description": "OBS output module used.", + "description": "OBS output module used. Unused since OBS Studio 30, kept for backward compatibility.", "enum": [ "rtmp_output", "ffmpeg_hls_muxer", diff --git a/plugins/rtmp-services/rtmp-common.c b/plugins/rtmp-services/rtmp-common.c index 3a62fbc00..94bba3f6c 100644 --- a/plugins/rtmp-services/rtmp-common.c +++ b/plugins/rtmp-services/rtmp-common.c @@ -17,7 +17,6 @@ struct rtmp_common { char *server; char *key; - char *output; struct obs_service_resolution *supported_resolutions; size_t supported_resolutions_count; int max_fps; @@ -77,10 +76,6 @@ static void ensure_valid_url(struct rtmp_common *service, json_t *json, static void update_recommendations(struct rtmp_common *service, json_t *rec) { - const char *out = get_string_val(rec, "output"); - if (out) - service->output = bstrdup(out); - json_t *sr = json_object_get(rec, "supported resolutions"); if (sr && json_is_array(sr)) { DARRAY(struct obs_service_resolution) res_list; @@ -122,7 +117,6 @@ static void rtmp_common_update(void *data, obs_data_t *settings) bfree(service->service); bfree(service->protocol); bfree(service->server); - bfree(service->output); bfree(service->key); service->service = bstrdup(obs_data_get_string(settings, "service")); @@ -130,7 +124,6 @@ static void rtmp_common_update(void *data, obs_data_t *settings) service->server = bstrdup(obs_data_get_string(settings, "server")); service->key = bstrdup(obs_data_get_string(settings, "key")); service->supports_additional_audio_track = false; - service->output = NULL; service->video_codecs = NULL; service->supported_resolutions = NULL; service->supported_resolutions_count = 0; @@ -158,9 +151,6 @@ static void rtmp_common_update(void *data, obs_data_t *settings) } } json_decref(root); - - if (!service->output) - service->output = bstrdup("rtmp_output"); } static void rtmp_common_destroy(void *data) @@ -173,7 +163,6 @@ static void rtmp_common_destroy(void *data) bfree(service->service); bfree(service->protocol); bfree(service->server); - bfree(service->output); bfree(service->key); bfree(service); } @@ -740,12 +729,6 @@ static void rtmp_common_apply_settings(void *data, obs_data_t *video_settings, } } -static const char *rtmp_common_get_output_type(void *data) -{ - struct rtmp_common *service = data; - return service->output; -} - static const char *rtmp_common_url(void *data) { struct rtmp_common *service = data; @@ -1017,7 +1000,6 @@ struct obs_service_info rtmp_common_service = { .get_username = rtmp_common_username, .get_password = rtmp_common_password, .apply_encoder_settings = rtmp_common_apply_settings, - .get_output_type = rtmp_common_get_output_type, .get_supported_resolutions = rtmp_common_get_supported_resolutions, .get_max_fps = rtmp_common_get_max_fps, .get_max_bitrate = rtmp_common_get_max_bitrate,