public final class AudioSampleEntry extends AbstractSampleEntry
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_ENCRYPTED
Identifier for an encrypted audio track.
|
static String |
TYPE1 |
static String |
TYPE10 |
static String |
TYPE11 |
static String |
TYPE12 |
static String |
TYPE13 |
static String |
TYPE2 |
static String |
TYPE3 |
static String |
TYPE4 |
static String |
TYPE5 |
static String |
TYPE7 |
static String |
TYPE8 |
static String |
TYPE9 |
dataReferenceIndexlargeBox, typeboxParser, dataSource| Constructor and Description |
|---|
AudioSampleEntry(String type) |
| Modifier and Type | Method and Description |
|---|---|
void |
getBox(WritableByteChannel writableByteChannel)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel. |
long |
getBytesPerFrame() |
long |
getBytesPerPacket() |
long |
getBytesPerSample() |
int |
getChannelCount() |
int |
getCompressionId() |
int |
getPacketSize() |
int |
getReserved1() |
long |
getReserved2() |
long |
getSampleRate() |
int |
getSampleSize() |
long |
getSamplesPerPacket() |
long |
getSize() |
int |
getSoundVersion() |
byte[] |
getSoundVersion2Data() |
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 |
setBytesPerFrame(long bytesPerFrame) |
void |
setBytesPerPacket(long bytesPerPacket) |
void |
setBytesPerSample(long bytesPerSample) |
void |
setChannelCount(int channelCount) |
void |
setCompressionId(int compressionId) |
void |
setPacketSize(int packetSize) |
void |
setReserved1(int reserved1) |
void |
setReserved2(long reserved2) |
void |
setSampleRate(long sampleRate) |
void |
setSampleSize(int sampleSize) |
void |
setSamplesPerPacket(long samplesPerPacket) |
void |
setSoundVersion(int soundVersion) |
void |
setSoundVersion2Data(byte[] soundVersion2Data) |
void |
setType(String type) |
String |
toString() |
getDataReferenceIndex, setDataReferenceIndexgetHeader, getOffset, getParent, getType, initContainer, setParentaddBox, close, getBoxes, getBoxes, getBoxes, getByteBuffer, getContainerSize, hasNext, next, remove, setBoxes, writeContainerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOffset, getParent, getType, setParentgetBoxes, getBoxes, getBoxes, getByteBuffer, setBoxes, writeContainerforEachRemainingpublic static final String TYPE1
public static final String TYPE2
public static final String TYPE3
public static final String TYPE4
public static final String TYPE5
public static final String TYPE7
public static final String TYPE8
public static final String TYPE9
public static final String TYPE10
public static final String TYPE11
public static final String TYPE12
public static final String TYPE13
public static final String TYPE_ENCRYPTED
public AudioSampleEntry(String type)
public void setType(String type)
public int getChannelCount()
public int getSampleSize()
public long getSampleRate()
public int getSoundVersion()
public int getCompressionId()
public int getPacketSize()
public long getSamplesPerPacket()
public long getBytesPerPacket()
public long getBytesPerFrame()
public long getBytesPerSample()
public byte[] getSoundVersion2Data()
public int getReserved1()
public long getReserved2()
public void setChannelCount(int channelCount)
public void setSampleSize(int sampleSize)
public void setSampleRate(long sampleRate)
public void setSoundVersion(int soundVersion)
public void setCompressionId(int compressionId)
public void setPacketSize(int packetSize)
public void setSamplesPerPacket(long samplesPerPacket)
public void setBytesPerPacket(long bytesPerPacket)
public void setBytesPerFrame(long bytesPerFrame)
public void setBytesPerSample(long bytesPerSample)
public void setReserved1(int reserved1)
public void setReserved2(long reserved2)
public void setSoundVersion2Data(byte[] soundVersion2Data)
public void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
BoxcontentSize, 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 Boxparse in class AbstractSampleEntrydataSource - 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 void getBox(WritableByteChannel writableByteChannel) throws IOException
BoxwritableByteChannel.getBox in interface BoxgetBox in class AbstractSampleEntrywritableByteChannel - the box's sinkIOException - in case of problems with the Channelpublic long getSize()
getSize in interface BoxgetSize in class AbstractContainerBoxpublic String toString()
toString in class BasicContainerCopyright © 2017. All rights reserved.