Rudimentary support for SRT output with TTXT codec
This commit is contained in:
parent
0a2a749566
commit
1187b60454
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,7 @@ namespace Mist {
|
||||||
capa["url_handler"] = "http";
|
capa["url_handler"] = "http";
|
||||||
capa["url_type"] = "subtitle";
|
capa["url_type"] = "subtitle";
|
||||||
capa["codecs"][0u][0u].append("srt");
|
capa["codecs"][0u][0u].append("srt");
|
||||||
|
capa["codecs"][0u][0u].append("TTXT");
|
||||||
capa["methods"][0u]["handler"] = "http";
|
capa["methods"][0u]["handler"] = "http";
|
||||||
capa["methods"][0u]["type"] = "html5/text/plain";
|
capa["methods"][0u]["type"] = "html5/text/plain";
|
||||||
capa["methods"][0u]["priority"] = 8ll;
|
capa["methods"][0u]["priority"] = 8ll;
|
||||||
|
@ -36,6 +37,9 @@ namespace Mist {
|
||||||
tmp.write(tmpBuf, tmpLen);
|
tmp.write(tmpBuf, tmpLen);
|
||||||
tmp << " --> ";
|
tmp << " --> ";
|
||||||
time += thisPacket.getInt("duration");
|
time += thisPacket.getInt("duration");
|
||||||
|
if (time == thisPacket.getTime()){
|
||||||
|
time += len * 100 + 1000;
|
||||||
|
}
|
||||||
tmpLen = sprintf(tmpBuf, "%.2llu:%.2llu:%.2llu,%.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
|
tmpLen = sprintf(tmpBuf, "%.2llu:%.2llu:%.2llu,%.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
|
||||||
tmp.write(tmpBuf, tmpLen);
|
tmp.write(tmpBuf, tmpLen);
|
||||||
tmp << std::endl;
|
tmp << std::endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue