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
77namespace 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 ()){
0 commit comments