Methods Summary |
---|
public void | _parseDetails(java.nio.ByteBuffer content)
parseVersionAndFlags(content);
int entryCount = l2i(IsoTypeReader.readUInt32(content));
entries = new ArrayList<Entry>(entryCount);
for (int i = 0; i < entryCount; i++) {
entries.add(new Entry(
IsoTypeReader.readUInt32(content),
IsoTypeReader.readUInt32(content),
IsoTypeReader.readUInt32(content)));
}
|
public long[] | blowup(int chunkCount)Decompresses the list of entries and returns the number of samples per chunk for
every single chunk.
long[] numberOfSamples = new long[chunkCount];
int j = 0;
List<SampleToChunkBox.Entry> sampleToChunkEntries = new LinkedList<Entry>(entries);
Collections.reverse(sampleToChunkEntries);
Iterator<Entry> iterator = sampleToChunkEntries.iterator();
SampleToChunkBox.Entry currentEntry = iterator.next();
for (int i = numberOfSamples.length; i > 1; i--) {
numberOfSamples[i - 1] = currentEntry.getSamplesPerChunk();
if (i == currentEntry.getFirstChunk()) {
currentEntry = iterator.next();
}
}
numberOfSamples[0] = currentEntry.getSamplesPerChunk();
return numberOfSamples;
|
protected void | getContent(java.nio.ByteBuffer byteBuffer)
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, entries.size());
for (Entry entry : entries) {
IsoTypeWriter.writeUInt32(byteBuffer, entry.getFirstChunk());
IsoTypeWriter.writeUInt32(byteBuffer, entry.getSamplesPerChunk());
IsoTypeWriter.writeUInt32(byteBuffer, entry.getSampleDescriptionIndex());
}
|
protected long | getContentSize()
return entries.size() * 12 + 8;
|
public java.util.List | getEntries()
return entries;
|
public void | setEntries(java.util.List entries)
this.entries = entries;
|
public java.lang.String | toString()
return "SampleToChunkBox[entryCount=" + entries.size() + "]";
|