protected ParsableBox createMoof ( long startSample , long endSample , Track track , int sequenceNumber ) { MovieFragmentBox moof = new MovieFragmentBox ( ) ; createMfhd ( startSample , endSample , track , sequenceNumber , moof ) ; createTraf ( startSample , endSample , track , sequenceNumber , moof ) ; TrackRunBox firstTrun = moof . getTrackRunBoxes ( ) . get ( 0 ) ; firstTrun . setDataOffset ( 1 ) ; // dummy to make size correct firstTrun . setDataOffset ( ( int ) ( 8 + moof . getSize ( ) ) ) ; // mdat header + moof size return moof ; }
Creates a moof box for a given sequence of samples .