@Override protected long getContentSize() { int size = 4; if ((getFlags() & 1) == 1) { size += 8; } size += 5; size += defaultSampleInfoSize == 0 ? sampleInfoSizes.length : 0; return size; }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if ((getFlags() & 1) == 1) { byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoType)); byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoTypeParameter)); } IsoTypeWriter.writeUInt8(byteBuffer, defaultSampleInfoSize); if (defaultSampleInfoSize == 0) { IsoTypeWriter.writeUInt32(byteBuffer, sampleInfoSizes.length); for (short sampleInfoSize : sampleInfoSizes) { IsoTypeWriter.writeUInt8(byteBuffer, sampleInfoSize); } } else { IsoTypeWriter.writeUInt32(byteBuffer, sampleCount); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if ((getFlags() & 1) == 1) { auxInfoType = IsoTypeReader.read4cc(content); auxInfoTypeParameter = IsoTypeReader.read4cc(content); } defaultSampleInfoSize = (short) IsoTypeReader.readUInt8(content); sampleCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); if (defaultSampleInfoSize == 0) { sampleInfoSizes = new short[sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleInfoSizes[i] = (short) IsoTypeReader.readUInt8(content); } } }
@Override protected long getContentSize() { int size = 4; if ((getFlags() & 1) == 1) { size += 8; } size += 5; size += defaultSampleInfoSize == 0 ? sampleInfoSizes.length : 0; return size; }
@Override protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if ((getFlags() & 1) == 1) { byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoType)); byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoTypeParameter)); } IsoTypeWriter.writeUInt8(byteBuffer, defaultSampleInfoSize); if (defaultSampleInfoSize == 0) { IsoTypeWriter.writeUInt32(byteBuffer, sampleInfoSizes.length); for (short sampleInfoSize : sampleInfoSizes) { IsoTypeWriter.writeUInt8(byteBuffer, sampleInfoSize); } } else { IsoTypeWriter.writeUInt32(byteBuffer, sampleCount); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if ((getFlags() & 1) == 1) { auxInfoType = IsoTypeReader.read4cc(content); auxInfoTypeParameter = IsoTypeReader.read4cc(content); } defaultSampleInfoSize = (short) IsoTypeReader.readUInt8(content); sampleCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); if (defaultSampleInfoSize == 0) { sampleInfoSizes = new short[sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleInfoSizes[i] = (short) IsoTypeReader.readUInt8(content); } } }