public final class AudioStreamChunk extends StreamChunk
Modifier and Type | Field and Description |
---|---|
static String[][] |
CODEC_DESCRIPTIONS
Stores the hex values of codec identifiers to their descriptions.
|
static long |
WMA
Stores the audio codec number for WMA
|
static long |
WMA_CBR
Stores the audio codec number for WMA (CBR)
|
static long |
WMA_LOSSLESS
Stores the audio codec number for WMA_LOSSLESS
|
static long |
WMA_PRO
Stores the audio codec number for WMA_PRO
|
static long |
WMA_VBR
Stores the audio codec number for WMA (VBR)
|
chunkLength, guid, position
Constructor and Description |
---|
AudioStreamChunk(BigInteger chunkLen)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
long |
getAverageBytesPerSec() |
int |
getBitsPerSample() |
long |
getBlockAlignment() |
long |
getChannelCount() |
byte[] |
getCodecData() |
String |
getCodecDescription()
This method will take a look at
compressionFormat and returns a
String with its hex value and if known a textual note on what coded it
represents. |
long |
getCompressionFormat() |
GUID |
getErrorConcealment() |
int |
getKbps()
This method takes the value of
getAverageBytesPerSec() and
calculates the kbps out of it, by simply multiplying by 8 and dividing by
1000. |
long |
getSamplingRate() |
boolean |
isErrorConcealed()
This mehtod returns whether the audio stream data is error concealed.
|
String |
prettyPrint(String prefix)
(overridden)
|
void |
setAverageBytesPerSec(long avgeBytesPerSec) |
void |
setBitsPerSample(int bps)
Sets the bitsPerSample
|
void |
setBlockAlignment(long align)
Sets the blockAlignment.
|
void |
setChannelCount(long channels) |
void |
setCodecData(byte[] codecSpecificData)
Sets the codecData
|
void |
setCompressionFormat(long cFormatCode) |
void |
setErrorConcealment(GUID errConc)
This method sets the error concealment type which is given by two GUIDs.
|
void |
setSamplingRate(long sampRate) |
getStreamNumber, getStreamSpecificDataSize, getStreamType, getTimeOffset, getTypeSpecificDataSize, isContentEncrypted, setContentEncrypted, setStreamNumber, setStreamSpecificDataSize, setTimeOffset, setTypeSpecificDataSize
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString
public static final String[][] CODEC_DESCRIPTIONS
public static final long WMA
public static final long WMA_CBR
public static final long WMA_LOSSLESS
public static final long WMA_PRO
public static final long WMA_VBR
public AudioStreamChunk(BigInteger chunkLen)
chunkLen
- Length of the entire chunk (including guid and size)public long getAverageBytesPerSec()
public int getBitsPerSample()
public long getBlockAlignment()
public long getChannelCount()
public byte[] getCodecData()
public String getCodecDescription()
compressionFormat
and returns a
String with its hex value and if known a textual note on what coded it
represents. public long getCompressionFormat()
public GUID getErrorConcealment()
public int getKbps()
getAverageBytesPerSec()
and
calculates the kbps out of it, by simply multiplying by 8 and dividing by
1000. public long getSamplingRate()
public boolean isErrorConcealed()
true
if error concealment is used.public String prettyPrint(String prefix)
prettyPrint
in class StreamChunk
prefix
- each line gets this string prepended.Chunk.prettyPrint(String)
public void setAverageBytesPerSec(long avgeBytesPerSec)
avgeBytesPerSec
- The averageBytesPerSec to set.public void setBitsPerSample(int bps)
bps
- public void setBlockAlignment(long align)
align
- public void setChannelCount(long channels)
channels
- The channelCount to set.public void setCodecData(byte[] codecSpecificData)
codecSpecificData
- public void setCompressionFormat(long cFormatCode)
cFormatCode
- The compressionFormat to set.public void setErrorConcealment(GUID errConc)
errConc
- the type of error concealment the audio stream is stored as.public void setSamplingRate(long sampRate)
sampRate
- The samplingRate to set.Copyright © 2005–2020 jthink.net. All rights reserved.