Added support for raw passthrough of MPEG2-TS data

This commit is contained in:
Phencys 2020-09-20 20:31:17 +02:00 committed by Thulinma
parent 267a74f0f6
commit 3734c90544
13 changed files with 187 additions and 7 deletions

View file

@ -135,6 +135,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("+AC3");
capa["codecs"][0u][1u].append("+MP2");
capa["codecs"][0u][1u].append("+opus");
capa["codecs"][1u][0u].append("rawts");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/video/mpeg";
capa["methods"][0u]["hrn"] = "TS HTTP progressive";

View file

@ -179,6 +179,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("+AC3");
capa["codecs"][0u][1u].append("+MP2");
capa["codecs"][0u][1u].append("+opus");
capa["codecs"][1u][0u].append("rawts");
cfg->addConnectorOptions(8888, capa);
config = cfg;
capa["push_urls"].append("tsudp://*");

View file

@ -75,6 +75,11 @@ namespace Mist{
size_t dataLen = 0;
thisPacket.getString("data", dataPointer, dataLen); // data
if (codec == "rawts"){
for (size_t i = 0; i+188 <= dataLen; i+=188){sendTS(dataPointer+i, 188);}
return;
}
packTime *= 90;
std::string bs;
// prepare bufferstring

View file

@ -202,6 +202,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("+AC3");
capa["codecs"][0u][1u].append("+MP2");
capa["codecs"][0u][1u].append("+opus");
capa["codecs"][1u][0u].append("rawts");
capa["optional"]["profile"]["name"] = "RIST profile";
capa["optional"]["profile"]["help"] = "RIST profile to use";

View file

@ -200,6 +200,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("AC3");
capa["codecs"][0u][1u].append("MP2");
capa["codecs"][0u][1u].append("opus");
capa["codecs"][1u][0u].append("rawts");
cfg->addConnectorOptions(8889, capa);
config = cfg;
capa["push_urls"].append("srt://*");