|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object entagged.audioformats.EncodingInfo
public class EncodingInfo
This class represents a structure for storing and retrieving information
about the codec respectively the encoding parameters.
Most of the parameters are available for nearly each audio format. Some
others would result in standard values.
Consider: None of the setter methods will actually affect the audio
file. This is just a structure for retrieving information, not manipulating
the audio file.
Field Summary | |
---|---|
static String |
FIELD_BITRATE
The key for the Bitrate.( Integer ) |
static String |
FIELD_CHANNEL
The key for the number of audio channels.( Integer ) |
static String |
FIELD_INFOS
The key for the extra encoding information.( String ) |
static String |
FIELD_LENGTH
The key for the audio clip duration in seconds. |
static String |
FIELD_SAMPLERATE
The key for the audio sample rate in "Hz". |
static String |
FIELD_TYPE
The key for the audio type.( String ) |
static String |
FIELD_VBR
The key for the VBR flag. |
Constructor Summary | |
---|---|
EncodingInfo()
Creates an instance with emtpy values. |
Method Summary | |
---|---|
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). |
String |
getEncodingType()
Returns the encoding type. |
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(String encodingType)
Sets the type of the encoding. This is a bit format specific. eg:Layer I/II/III |
void |
setExtraEncodingInfos(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. |
String |
toString()
Pretty prints this encoding info |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String FIELD_BITRATE
Integer
)
content
,
Constant Field Valuespublic static final String FIELD_CHANNEL
Integer
)
content
,
Constant Field Valuespublic static final String FIELD_INFOS
String
)
content
,
Constant Field Valuespublic static final String FIELD_LENGTH
Float
)
content
,
Constant Field Valuespublic static final String FIELD_SAMPLERATE
Integer
)
content
,
Constant Field Valuespublic static final String FIELD_TYPE
String
)
content
,
Constant Field Valuespublic static final String FIELD_VBR
Boolean
)
content
,
Constant Field ValuesConstructor Detail |
---|
public EncodingInfo()
Method Detail |
---|
public int getBitrate()
public int getChannelNumber()
public String getEncodingType()
public 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(String encodingType)
encodingType
- Encoding type.public void setExtraEncodingInfos(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 String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |