diff --git a/CMakeLists.txt b/CMakeLists.txt index c9c7369e..78032193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -483,7 +483,7 @@ makeInput(Folder folder)#LTS makeInput(Playlist playlist)#LTS makeInput(Balancer balancer)#LTS makeInput(RTSP rtsp)#LTS -makeInput(SRT srt)#LTS +makeInput(SubRip srt)#LTS makeInput(SDP sdp) if(SRT_LIB) @@ -559,7 +559,7 @@ makeOutput(AAC aac http) makeOutput(MP3 mp3 http) makeOutput(H264 h264 http) makeOutput(HDS hds http) -makeOutput(SRT srt http) +makeOutput(SubRip srt http) makeOutput(JSON json http) option(WITH_JPG "Build JPG thumbnailer output support") if (WITH_JPG) diff --git a/src/controller/controller.cpp b/src/controller/controller.cpp index d8aaf053..25502cbb 100644 --- a/src/controller/controller.cpp +++ b/src/controller/controller.cpp @@ -545,6 +545,14 @@ int main_loop(int argc, char **argv){ continue; } + if ((*it)["connector"].asStringRef() == "SRT"){ + edit = true; + JSON::Value newSubRip = *it; + newSubRip["connector"] = "SubRip"; + newVal.append(newSubRip); + continue; + } + if ((*it)["connector"].asStringRef() == "CMAF"){foundCMAF = true;} newVal.append(*it); } diff --git a/src/input/input_srt.cpp b/src/input/input_srt.cpp index 85cf7cf3..d990dba5 100644 --- a/src/input/input_srt.cpp +++ b/src/input/input_srt.cpp @@ -4,9 +4,9 @@ namespace Mist{ InputSrt::InputSrt(Util::Config *cfg) : Input(cfg){ vtt = false; - capa["name"] = "SRT"; + capa["name"] = "SubRip"; capa["decs"] = - "This input allows streaming of SRT and WebVTT subtitle files as Video on Demand."; + "This input allows streaming of SubRip (SRT and WebVTT) subtitle files as Video on Demand."; capa["source_match"].append("/*.srt"); capa["source_match"].append("/*.vtt"); capa["priority"] = 9; diff --git a/src/input/meson.build b/src/input/meson.build index 37524c44..252cd2b6 100644 --- a/src/input/meson.build +++ b/src/input/meson.build @@ -14,7 +14,7 @@ inputs = [ {'name' : 'Playlist', 'format' : 'playlist'}, {'name' : 'Balancer', 'format' : 'balancer'}, {'name' : 'RTSP', 'format' : 'rtsp'}, - {'name' : 'SRT', 'format' : 'srt'}, + {'name' : 'SubRip', 'format' : 'srt'}, {'name' : 'SDP', 'format' : 'sdp'}, {'name' : 'AAC', 'format' : 'aac'}, {'name' : 'FLAC', 'format' : 'flac'}, diff --git a/src/output/meson.build b/src/output/meson.build index 940cc289..6b4a2d65 100644 --- a/src/output/meson.build +++ b/src/output/meson.build @@ -10,7 +10,7 @@ outputs = [ {'name' : 'MP3', 'format' : 'mp3', 'extra': ['http']}, {'name' : 'H264', 'format' : 'h264', 'extra': ['http']}, {'name' : 'HDS', 'format' : 'hds', 'extra': ['http']}, - {'name' : 'SRT', 'format' : 'srt', 'extra': ['http']}, + {'name' : 'SubRip', 'format' : 'srt', 'extra': ['http']}, {'name' : 'JSON', 'format' : 'json', 'extra': ['http']}, {'name' : 'TS', 'format' : 'ts', 'extra': ['ts']}, {'name' : 'HTTPTS', 'format' : 'httpts', 'extra': ['http', 'ts']}, diff --git a/src/output/output_srt.cpp b/src/output/output_srt.cpp index e20456b2..81994a07 100644 --- a/src/output/output_srt.cpp +++ b/src/output/output_srt.cpp @@ -10,8 +10,8 @@ namespace Mist{ void OutSRT::init(Util::Config *cfg){ HTTPOutput::init(cfg); - capa["name"] = "SRT"; - capa["friendly"] = "SubRip/WebVTT over HTTP"; + capa["name"] = "SubRip"; + capa["friendly"] = "SubRip (SRT/WebVTT) over HTTP"; capa["desc"] = "Pseudostreaming in SubRip Text (SRT) and WebVTT formats over HTTP"; capa["url_match"].append("/$.srt"); capa["url_match"].append("/$.vtt");