Skip to content

Commit cbaee6a

Browse files
committed
refactor: MistOutSRT --> MistOutSubRip
1 parent 8fca97c commit cbaee6a

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/output/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ outputs = [
1010
{'name' : 'MP3', 'format' : 'mp3', 'extra': ['http']},
1111
{'name' : 'H264', 'format' : 'h264', 'extra': ['http']},
1212
{'name' : 'HDS', 'format' : 'hds', 'extra': ['http']},
13-
{'name' : 'SubRip', 'format' : 'srt', 'extra': ['http']},
13+
{'name' : 'SubRip', 'format' : 'subrip', 'extra': ['http']},
1414
{'name' : 'JSON', 'format' : 'json', 'extra': ['http']},
1515
{'name' : 'TS', 'format' : 'ts', 'extra': ['ts']},
1616
{'name' : 'HTTPTS', 'format' : 'httpts', 'extra': ['http', 'ts']},
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#include "output_srt.h"
1+
#include "output_subrip.h"
22
#include <sstream>
33
#include <mist/checksum.h>
44
#include <mist/defines.h>
55
#include <mist/http_parser.h>
66

77
namespace Mist{
8-
OutSRT::OutSRT(Socket::Connection &conn) : HTTPOutput(conn){realTime = 0;}
9-
OutSRT::~OutSRT(){}
8+
OutSubRip::OutSubRip(Socket::Connection &conn) : HTTPOutput(conn){realTime = 0;}
9+
OutSubRip::~OutSubRip(){}
1010

11-
void OutSRT::init(Util::Config *cfg){
11+
void OutSubRip::init(Util::Config *cfg){
1212
HTTPOutput::init(cfg);
1313
capa["name"] = "SubRip";
1414
capa["friendly"] = "SubRip (SRT/WebVTT) over HTTP";
@@ -29,7 +29,7 @@ namespace Mist{
2929
capa["methods"][1u]["url_rel"] = "/$.webvtt";
3030
}
3131

32-
void OutSRT::sendNext(){
32+
void OutSubRip::sendNext(){
3333
// Reached the end we wanted? Stop here.
3434
if (filter_to > 0 && thisTime > filter_to && filter_to > filter_from){
3535
config->is_active = false;
@@ -63,7 +63,7 @@ namespace Mist{
6363
myConn.SendNow("\n\n");
6464
}
6565

66-
void OutSRT::sendHeader(){
66+
void OutSubRip::sendHeader(){
6767
H.setCORSHeaders();
6868
H.SetHeader("Content-Type", (webVTT ? "text/vtt; charset=utf-8" : "text/plain; charset=utf-8"));
6969
H.protocol = "HTTP/1.0";
@@ -72,7 +72,7 @@ namespace Mist{
7272
sentHeader = true;
7373
}
7474

75-
void OutSRT::onHTTP(){
75+
void OutSubRip::onHTTP(){
7676
std::string method = H.method;
7777
webVTT = (H.url.find(".vtt") != std::string::npos) || (H.url.find(".webvtt") != std::string::npos);
7878
if (H.GetVar("track").size()){
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include "output_http.h"
22

33
namespace Mist{
4-
class OutSRT : public HTTPOutput{
4+
class OutSubRip : public HTTPOutput{
55
public:
6-
OutSRT(Socket::Connection &conn);
7-
~OutSRT();
6+
OutSubRip(Socket::Connection &conn);
7+
~OutSubRip();
88
static void init(Util::Config *cfg);
99
void onHTTP();
1010
void sendNext();
@@ -20,5 +20,5 @@ namespace Mist{
2020
}// namespace Mist
2121

2222
#ifndef ONE_BINARY
23-
typedef Mist::OutSRT mistOut;
23+
typedef Mist::OutSubRip mistOut;
2424
#endif

0 commit comments

Comments
 (0)