public abstract class AbstractSampleEntry extends AbstractContainerBox implements SampleEntry
AudioSampleEntry
,
VisualSampleEntry
,
TextSampleEntry
Modifier and Type | Field and Description |
---|---|
protected int |
dataReferenceIndex |
largeBox, type
boxParser, dataSource
Modifier | Constructor and Description |
---|---|
protected |
AbstractSampleEntry(String type) |
Modifier and Type | Method and Description |
---|---|
abstract void |
getBox(WritableByteChannel writableByteChannel)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel . |
int |
getDataReferenceIndex() |
abstract void |
parse(DataSource dataSource,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).
|
void |
setDataReferenceIndex(int dataReferenceIndex) |
getHeader, getOffset, getParent, getSize, getType, initContainer, setParent
addBox, close, getBoxes, getBoxes, getBoxes, getByteBuffer, getContainerSize, hasNext, next, remove, setBoxes, toString, writeContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOffset, getParent, getSize, getType, setParent
getBoxes, getBoxes, getBoxes, getByteBuffer, setBoxes, writeContainer
forEachRemaining
protected AbstractSampleEntry(String type)
public int getDataReferenceIndex()
getDataReferenceIndex
in interface SampleEntry
public void setDataReferenceIndex(int dataReferenceIndex)
setDataReferenceIndex
in interface SampleEntry
public abstract void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
Box
contentSize
, contentSize
number of bytes should be read from the box source (readableByteChannel
).
If you need the header
buffer at a later stage you have to create a copy.parse
in interface Box
parse
in class AbstractContainerBox
dataSource
- the source for this boxheader
- the box' already parsed header (create copy if you need it
later as it will be overwritten)contentSize
- remaining bytes of this boxboxParser
- use it to parse sub-boxes.IOException
- in case of an error during a read operationpublic abstract void getBox(WritableByteChannel writableByteChannel) throws IOException
Box
writableByteChannel
.getBox
in interface Box
getBox
in class AbstractContainerBox
writableByteChannel
- the box's sinkIOException
- in case of problems with the Channel
Copyright © 2017. All rights reserved.