UNPKG

mp4box

Version:

JavaScript version of GPAC's MP4Box tool

17 lines (15 loc) 460 B
BoxParser.createFullBoxCtor("stsc", "SampleToChunkBox", function(stream) { var entry_count; var i; entry_count = stream.readUint32(); this.first_chunk = []; this.samples_per_chunk = []; this.sample_description_index = []; if (this.version === 0) { for(i=0; i<entry_count; i++) { this.first_chunk.push(stream.readUint32()); this.samples_per_chunk.push(stream.readUint32()); this.sample_description_index.push(stream.readUint32()); } } });