Merge branch 'development' into LTS_development
This commit is contained in:
commit
397280f2cd
2 changed files with 5 additions and 5 deletions
|
@ -745,7 +745,7 @@ namespace TS {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramMappingEntry::setElementaryPid(int newElementaryPid) {
|
void ProgramMappingEntry::setElementaryPid(int newElementaryPid) {
|
||||||
data[1] = newElementaryPid >> 8 & 0x1F;
|
data[1] = (newElementaryPid >> 8 & 0x1F) | 0xE0; //0xE0 = three reserved bits
|
||||||
data[2] = newElementaryPid & 0xFF;
|
data[2] = newElementaryPid & 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -758,7 +758,7 @@ namespace TS {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramMappingEntry::setESInfo(const std::string & newInfo){
|
void ProgramMappingEntry::setESInfo(const std::string & newInfo){
|
||||||
data[3] = (newInfo.size() >> 8) & 0x0F;
|
data[3] = ((newInfo.size() >> 8) & 0x0F) | 0xF0; //0xF0 = four reserved bits
|
||||||
data[4] = newInfo.size() & 0xFF;
|
data[4] = newInfo.size() & 0xFF;
|
||||||
memcpy(data + 5, newInfo.data(), newInfo.size());
|
memcpy(data + 5, newInfo.data(), newInfo.size());
|
||||||
}
|
}
|
||||||
|
@ -993,12 +993,12 @@ namespace TS {
|
||||||
if (vidTrack == -1){
|
if (vidTrack == -1){
|
||||||
vidTrack = *(selectedTracks.begin());
|
vidTrack = *(selectedTracks.begin());
|
||||||
}
|
}
|
||||||
PMT.setPCRPID(256 + vidTrack);
|
PMT.setPCRPID(255 + vidTrack);
|
||||||
PMT.setProgramInfoLength(0);
|
PMT.setProgramInfoLength(0);
|
||||||
short id = 0;
|
short id = 0;
|
||||||
ProgramMappingEntry entry = PMT.getEntry(0);
|
ProgramMappingEntry entry = PMT.getEntry(0);
|
||||||
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
||||||
entry.setElementaryPid(256 + *it);
|
entry.setElementaryPid(255 + *it);
|
||||||
entry.setESInfo("");
|
entry.setESInfo("");
|
||||||
if (myMeta.tracks[*it].codec == "H264"){
|
if (myMeta.tracks[*it].codec == "H264"){
|
||||||
entry.setStreamType(0x1B);
|
entry.setStreamType(0x1B);
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Mist {
|
||||||
|
|
||||||
if (packData.getBytesFree() == 184){
|
if (packData.getBytesFree() == 184){
|
||||||
packData.clear();
|
packData.clear();
|
||||||
packData.setPID(256 + thisPacket.getTrackId());
|
packData.setPID(255 + thisPacket.getTrackId());
|
||||||
packData.setContinuityCounter(++contCounters[packData.getPID()]);
|
packData.setContinuityCounter(++contCounters[packData.getPID()]);
|
||||||
if (first[thisPacket.getTrackId()]){
|
if (first[thisPacket.getTrackId()]){
|
||||||
packData.setUnitStart(1);
|
packData.setUnitStart(1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue