mp4box
Version:
JavaScript version of GPAC's MP4Box tool
14 lines (12 loc) • 459 B
JavaScript
BoxParser.createBoxCtor("cdef", "ComponentDefinitionBox", function(stream) {
var i;
this.channel_count = stream.readUint16();
this.channel_indexes = [];
this.channel_types = [];
this.channel_associations = [];
for (i = 0; i < this.channel_count; i++) {
this.channel_indexes.push(stream.readUint16());
this.channel_types.push(stream.readUint16());
this.channel_associations.push(stream.readUint16());
}
});