diff --git a/src/output/meson.build b/src/output/meson.build index 4d7777281..62e85a0b8 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' : 'SubRip', 'format' : 'srt', 'extra': ['http']}, + {'name' : 'SubRip', 'format' : 'subrip', '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_subrip.cpp similarity index 93% rename from src/output/output_srt.cpp rename to src/output/output_subrip.cpp index aaa658978..f6322655f 100644 --- a/src/output/output_srt.cpp +++ b/src/output/output_subrip.cpp @@ -1,14 +1,14 @@ -#include "output_srt.h" +#include "output_subrip.h" #include #include #include #include namespace Mist{ - OutSRT::OutSRT(Socket::Connection &conn) : HTTPOutput(conn){realTime = 0;} - OutSRT::~OutSRT(){} + OutSubRip::OutSubRip(Socket::Connection &conn) : HTTPOutput(conn){realTime = 0;} + OutSubRip::~OutSubRip(){} - void OutSRT::init(Util::Config *cfg){ + void OutSubRip::init(Util::Config *cfg){ HTTPOutput::init(cfg); capa["name"] = "SubRip"; capa["friendly"] = "SubRip (SRT/WebVTT) over HTTP"; @@ -29,7 +29,7 @@ namespace Mist{ capa["methods"][1u]["url_rel"] = "/$.webvtt"; } - void OutSRT::sendNext(){ + void OutSubRip::sendNext(){ // Reached the end we wanted? Stop here. if (filter_to > 0 && thisTime > filter_to && filter_to > filter_from){ config->is_active = false; @@ -63,7 +63,7 @@ namespace Mist{ myConn.SendNow("\n\n"); } - void OutSRT::sendHeader(){ + void OutSubRip::sendHeader(){ H.setCORSHeaders(); H.SetHeader("Content-Type", (webVTT ? "text/vtt; charset=utf-8" : "text/plain; charset=utf-8")); H.protocol = "HTTP/1.0"; @@ -72,7 +72,7 @@ namespace Mist{ sentHeader = true; } - void OutSRT::onHTTP(){ + void OutSubRip::onHTTP(){ std::string method = H.method; webVTT = (H.url.find(".vtt") != std::string::npos) || (H.url.find(".webvtt") != std::string::npos); if (H.GetVar("track").size()){ diff --git a/src/output/output_srt.h b/src/output/output_subrip.h similarity index 69% rename from src/output/output_srt.h rename to src/output/output_subrip.h index 4901dc30e..ec458a24b 100644 --- a/src/output/output_srt.h +++ b/src/output/output_subrip.h @@ -1,10 +1,10 @@ #include "output_http.h" namespace Mist{ - class OutSRT : public HTTPOutput{ + class OutSubRip : public HTTPOutput{ public: - OutSRT(Socket::Connection &conn); - ~OutSRT(); + OutSubRip(Socket::Connection &conn); + ~OutSubRip(); static void init(Util::Config *cfg); void onHTTP(); void sendNext(); @@ -19,4 +19,4 @@ namespace Mist{ }; }// namespace Mist -typedef Mist::OutSRT mistOut; +typedef Mist::OutSubRip mistOut;