Added DTS audio support to EBML input/output
This commit is contained in:
parent
ab39cca5f4
commit
8afad6d574
2 changed files with 20 additions and 0 deletions
|
@ -35,6 +35,7 @@ namespace Mist{
|
|||
capa["codecs"].append("MP3");
|
||||
capa["codecs"].append("AC3");
|
||||
capa["codecs"].append("FLOAT");
|
||||
capa["codecs"].append("DTS");
|
||||
capa["codecs"].append("JSON");
|
||||
capa["codecs"].append("subtitle");
|
||||
lastClusterBPos = 0;
|
||||
|
@ -235,6 +236,10 @@ namespace Mist{
|
|||
tmpElem = E.findChild(EBML::EID_CODECPRIVATE);
|
||||
if (tmpElem){init = tmpElem.getValStringUntrimmed();}
|
||||
}
|
||||
if (codec == "A_DTS"){
|
||||
trueCodec = "DTS";
|
||||
trueType = "audio";
|
||||
}
|
||||
if (codec == "A_PCM/INT/BIG"){
|
||||
trueCodec = "PCM";
|
||||
trueType = "audio";
|
||||
|
@ -365,6 +370,12 @@ namespace Mist{
|
|||
newTime += (1000000 / Trk.rate)/timeScale;//assume ~1000 samples per frame
|
||||
} else if (Trk.codec == "MP3"){
|
||||
newTime += (1152000 / Trk.rate)/timeScale;//1152 samples per frame
|
||||
} else if (Trk.codec == "DTS"){
|
||||
//Assume 512 samples per frame (DVD default)
|
||||
//actual amount can be calculated from data, but data
|
||||
//is not available during header generation...
|
||||
//See: http://www.stnsoft.com/DVD/dtshdr.html
|
||||
newTime += (512000 / Trk.rate)/timeScale;
|
||||
}else{
|
||||
newTime += 1/timeScale;
|
||||
ERROR_MSG("Unknown frame duration for codec %s - timestamps WILL be wrong!", Trk.codec.c_str());
|
||||
|
@ -531,6 +542,12 @@ namespace Mist{
|
|||
newTime += (1000000 / Trk.rate)/timeScale;//assume ~1000 samples per frame
|
||||
} else if (Trk.codec == "MP3"){
|
||||
newTime += (1152000 / Trk.rate)/timeScale;//1152 samples per frame
|
||||
} else if (Trk.codec == "DTS"){
|
||||
//Assume 512 samples per frame (DVD default)
|
||||
//actual amount can be calculated from data, but data
|
||||
//is not available during header generation...
|
||||
//See: http://www.stnsoft.com/DVD/dtshdr.html
|
||||
newTime += (512000 / Trk.rate)/timeScale;
|
||||
}else{
|
||||
ERROR_MSG("Unknown frame duration for codec %s - timestamps WILL be wrong!", Trk.codec.c_str());
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace Mist{
|
|||
capa["codecs"][0u][1u].append("MP3");
|
||||
capa["codecs"][0u][1u].append("FLOAT");
|
||||
capa["codecs"][0u][1u].append("AC3");
|
||||
capa["codecs"][0u][1u].append("DTS");
|
||||
capa["codecs"][0u][2u].append("+JSON");
|
||||
capa["methods"][0u]["handler"] = "http";
|
||||
capa["methods"][0u]["type"] = "html5/video/webm";
|
||||
|
@ -58,6 +59,7 @@ namespace Mist{
|
|||
capa["exceptions"]["codec:MP3"] = blacklistNonChrome;
|
||||
capa["exceptions"]["codec:FLOAT"] = blacklistNonChrome;
|
||||
capa["exceptions"]["codec:AC3"] = blacklistNonChrome;
|
||||
capa["exceptions"]["codec:DTS"] = blacklistNonChrome;
|
||||
}
|
||||
|
||||
/// Calculates the size of a Cluster (contents only) and returns it.
|
||||
|
@ -134,6 +136,7 @@ namespace Mist{
|
|||
if (Trk.codec == "ALAW"){return "A_MS/ACM";}
|
||||
if (Trk.codec == "ULAW"){return "A_MS/ACM";}
|
||||
if (Trk.codec == "FLOAT"){return "A_PCM/FLOAT/IEEE";}
|
||||
if (Trk.codec == "DTS"){return "A_DTS";}
|
||||
if (Trk.codec == "JSON"){return "M_JSON";}
|
||||
return "E_UNKNOWN";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue