public class EncodingInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_BITRATE
The key for the Bitrate.(
Integer) |
static java.lang.String |
FIELD_CHANNEL
The key for the number of audio channels.(
Integer) |
static java.lang.String |
FIELD_INFOS
The key for the extra encoding information.(
String) |
static java.lang.String |
FIELD_LENGTH
The key for the audio clip duration in seconds.
|
static java.lang.String |
FIELD_SAMPLERATE
The key for the audio sample rate in "Hz".
|
static java.lang.String |
FIELD_TYPE
The key for the audio type.(
String) |
static java.lang.String |
FIELD_VBR
The key for the VBR flag.
|
| Constructor and Description |
|---|
EncodingInfo()
Creates an instance with emtpy values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBitrate()
This method returns the bitrate of the represented audio clip in
"Kbps".
|
int |
getChannelNumber()
This method returns the number of audio channels the clip contains.
(The stereo, mono thing). |
java.lang.String |
getEncodingType()
Returns the encoding type.
|
java.lang.String |
getExtraEncodingInfos()
This method returns some extra information about the encoding.
This may not contain anything for some audio formats. |
int |
getLength()
This method returns the duration of the represented audio clip in
seconds.
|
float |
getPreciseLength()
This method returns the duration of the represented audio clip in seconds
(single-precision).
|
int |
getSamplingRate()
This method returns the sample rate, the audio clip was encoded with.
|
boolean |
isVbr()
This method returns
true, if the audio file is encoded
with "Variable Bitrate". |
void |
setBitrate(int bitrate)
This Method sets the bitrate in "Kbps".
|
void |
setChannelNumber(int chanNb)
Sets the number of channels.
|
void |
setEncodingType(java.lang.String encodingType)
Sets the type of the encoding.
This is a bit format specific. eg:Layer I/II/III |
void |
setExtraEncodingInfos(java.lang.String infos)
A string contianing anything else that might be interesting
|
void |
setLength(int length)
This method sets the audio duration of the represented clip.
|
void |
setPreciseLength(float seconds)
This method sets the audio duration of the represented clip.
|
void |
setSamplingRate(int samplingRate)
Sets the Sampling rate in "Hz"
|
void |
setVbr(boolean b)
Sets the VBR flag for the represented audio clip.
|
java.lang.String |
toString()
Pretty prints this encoding info
|
public static final java.lang.String FIELD_BITRATE
Integer)content,
Constant Field Valuespublic static final java.lang.String FIELD_CHANNEL
Integer)content,
Constant Field Valuespublic static final java.lang.String FIELD_INFOS
String)content,
Constant Field Valuespublic static final java.lang.String FIELD_LENGTH
Float)content,
Constant Field Valuespublic static final java.lang.String FIELD_SAMPLERATE
Integer)content,
Constant Field Valuespublic static final java.lang.String FIELD_TYPE
String)content,
Constant Field Valuespublic static final java.lang.String FIELD_VBR
Boolean)content,
Constant Field Valuespublic int getBitrate()
public int getChannelNumber()
public java.lang.String getEncodingType()
public java.lang.String getExtraEncodingInfos()
public int getLength()
getPreciseLength()public float getPreciseLength()
getLength()public int getSamplingRate()
public boolean isVbr()
true, if the audio file is encoded
with "Variable Bitrate".true if audio clip is encoded with VBR.public void setBitrate(int bitrate)
bitrate - bitrate in kbps.public void setChannelNumber(int chanNb)
chanNb - number of channels (2 for stereo, 1 for mono).public void setEncodingType(java.lang.String encodingType)
encodingType - Encoding type.public void setExtraEncodingInfos(java.lang.String infos)
infos - Extra information.public void setLength(int length)
length - The duration of the audio clip in seconds.public void setPreciseLength(float seconds)
seconds - The duration of the audio clip in seconds (single-precision).public void setSamplingRate(int samplingRate)
samplingRate - Sample rate.public void setVbr(boolean b)
b - true if VBR.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()