Support for TREX boxes in MP4::Stream parser and all binaries that use it
This commit is contained in:
parent
57655f1b21
commit
0e26d49bec
7 changed files with 71 additions and 25 deletions
|
|
@ -97,6 +97,10 @@ bool AnalyserMP4::parsePacket(){
|
|||
// Regardless of support, we now put it in our track header array (after all, even unsupported tracks can be analysed!)
|
||||
hdrs[tHdr.trackId].read(*trakIt);
|
||||
}
|
||||
std::deque<MP4::TREX> trex = ((MP4::MOOV*)&mp4Data)->getChild<MP4::MVEX>().getChildren<MP4::TREX>();
|
||||
for (std::deque<MP4::TREX>::iterator trexIt = trex.begin(); trexIt != trex.end(); trexIt++){
|
||||
hdrs[trexIt->getTrackID()].read(*trexIt);
|
||||
}
|
||||
// If we stored an mdat earlier, we can now analyse and then wipe it
|
||||
if (mdat.size()){
|
||||
MP4::Box mdatBox(mdat, false);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,12 @@ namespace Mist{
|
|||
trackHeaders.push_back(MP4::TrackHeader());
|
||||
trackHeaders.rbegin()->read(*trakIt);
|
||||
}
|
||||
std::deque<MP4::TREX> trex = ((MP4::MOOV*)&moovBox)->getChild<MP4::MVEX>().getChildren<MP4::TREX>();
|
||||
for (std::deque<MP4::TREX>::iterator trexIt = trex.begin(); trexIt != trex.end(); trexIt++){
|
||||
for (std::deque<MP4::TrackHeader>::iterator it = trackHeaders.begin(); it != trackHeaders.end(); it++){
|
||||
if (it->trackId == trexIt->getTrackID()){it->read(*trexIt);}
|
||||
}
|
||||
}
|
||||
hasMoov = true;
|
||||
}
|
||||
activityCounter = Util::bootSecs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue