Added track language support to TS input
This commit is contained in:
parent
523c00f462
commit
d0abad68b3
3 changed files with 30 additions and 2 deletions
|
@ -736,6 +736,10 @@ namespace TS {
|
|||
avccBox.setPPSNumber(1);
|
||||
avccBox.setPPS(ppsInfo[it->first]);
|
||||
meta.tracks[it->first].init = std::string(avccBox.payload(), avccBox.payloadSize());
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case H265: {
|
||||
|
@ -747,6 +751,17 @@ namespace TS {
|
|||
meta.tracks[it->first].codec = "HEVC";
|
||||
meta.tracks[it->first].trackID = it->first;
|
||||
meta.tracks[it->first].init = hevcInfo[it->first].generateHVCC();
|
||||
int pmtCount = associationTable.getProgramCount();
|
||||
for (int i = 0; i < pmtCount; i++){
|
||||
int pid = associationTable.getProgramPID(i);
|
||||
ProgramMappingEntry entry = mappingTable[pid].getEntry(0);
|
||||
while (entry){
|
||||
if (entry.getElementaryPid() == tid){
|
||||
meta.tracks[it->first].lang = ProgramDescriptors(entry.getESInfo(), entry.getESInfoLength()).getLanguage();
|
||||
}
|
||||
entry.advance();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ID3: {
|
||||
|
@ -780,6 +795,18 @@ namespace TS {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
int pmtCount = associationTable.getProgramCount();
|
||||
for (int i = 0; i < pmtCount; i++){
|
||||
int pid = associationTable.getProgramPID(i);
|
||||
ProgramMappingEntry entry = mappingTable[pid].getEntry(0);
|
||||
while (entry){
|
||||
if (entry.getElementaryPid() == tid){
|
||||
meta.tracks[it->first].lang = ProgramDescriptors(entry.getESInfo(), entry.getESInfoLength()).getLanguage();
|
||||
}
|
||||
entry.advance();
|
||||
}
|
||||
}
|
||||
MEDIUM_MSG("Initialized track %lu as %s %s", it->first, meta.tracks[it->first].codec.c_str(), meta.tracks[it->first].type.c_str());
|
||||
}
|
||||
if (threaded){
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace TS {
|
|||
std::map<unsigned long, std::string > ppsInfo;
|
||||
std::map<unsigned long, h265::initData > hevcInfo;
|
||||
std::map<unsigned long, std::string> metaInit;
|
||||
std::map<unsigned long, std::string> descriptors;
|
||||
|
||||
mutable IPC::semaphore globalSem;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue