UNPKG

mp4box

Version:

JavaScript version of GPAC's MP4Box tool

17 lines (15 loc) 534 B
BoxParser.createFullBoxCtor("sdtp", "SampleDependencyTypeBox", function(stream) { var tmp_byte; var count = (this.size - this.hdr_size); this.is_leading = []; this.sample_depends_on = []; this.sample_is_depended_on = []; this.sample_has_redundancy = []; for (var i = 0; i < count; i++) { tmp_byte = stream.readUint8(); this.is_leading[i] = tmp_byte >> 6; this.sample_depends_on[i] = (tmp_byte >> 4) & 0x3; this.sample_is_depended_on[i] = (tmp_byte >> 2) & 0x3; this.sample_has_redundancy[i] = tmp_byte & 0x3; } });