|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.audio.asf.data.Chunk org.jaudiotagger.audio.asf.data.StreamChunk org.jaudiotagger.audio.asf.data.AudioStreamChunk
public final class AudioStreamChunk
This class represents the stream chunk describing an audio stream.
Field Summary | |
---|---|
private long |
averageBytesPerSec
Stores the average amount of bytes used by audio stream. |
private int |
bitsPerSample
Amount of bits used per sample. |
private long |
blockAlignment
The block alignment of the audio data. |
private long |
channelCount
Number of channels. |
static java.lang.String[][] |
CODEC_DESCRIPTIONS
Stores the hex values of codec identifiers to their descriptions. |
private byte[] |
codecData
Some data which needs to be interpreted if the codec is handled. |
private long |
compressionFormat
The audio compression format code. |
private GUID |
errorConcealment
this field stores the error concealment type. |
private long |
samplingRate
Sampling rate of audio stream. |
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) |
Fields inherited from class org.jaudiotagger.audio.asf.data.Chunk |
---|
chunkLength, guid, position |
Constructor Summary | |
---|---|
AudioStreamChunk(java.math.BigInteger chunkLen)
Creates an instance. |
Method Summary | |
---|---|
long |
getAverageBytesPerSec()
|
int |
getBitsPerSample()
|
long |
getBlockAlignment()
|
long |
getChannelCount()
|
byte[] |
getCodecData()
|
java.lang.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. |
java.lang.String |
prettyPrint(java.lang.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)
|
Methods inherited from class org.jaudiotagger.audio.asf.data.StreamChunk |
---|
getStreamNumber, getStreamSpecificDataSize, getStreamType, getTimeOffset, getTypeSpecificDataSize, isContentEncrypted, setContentEncrypted, setStreamNumber, setStreamSpecificDataSize, setTimeOffset, setTypeSpecificDataSize |
Methods inherited from class org.jaudiotagger.audio.asf.data.Chunk |
---|
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.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
private long averageBytesPerSec
private int bitsPerSample
private long blockAlignment
private long channelCount
private byte[] codecData
private long compressionFormat
private GUID errorConcealment
private long samplingRate
Constructor Detail |
---|
public AudioStreamChunk(java.math.BigInteger chunkLen)
chunkLen
- Length of the entire chunk (including guid and size)Method Detail |
---|
public long getAverageBytesPerSec()
public int getBitsPerSample()
public long getBlockAlignment()
public long getChannelCount()
public byte[] getCodecData()
public java.lang.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 java.lang.String prettyPrint(java.lang.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |