|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthelliker.id3.XingVBRHeader
public class XingVBRHeader
Reads information from a Xing info header. Thanks to the Scilla project (http://www.xs4all.nl/~rwvtveer/scilla/) for code ideas.
| Constructor Summary | |
|---|---|
XingVBRHeader(ByteBuffer header,
int layer,
int mpegVersion,
int sampleRate,
int channelMode,
long filesize)
Looks for a Xing VBR header in the file. |
|
| Method Summary | |
|---|---|
protected void |
calc(int layer,
int mpegVersion,
int sampleRate)
Calculates the playing time and the average bitrate. |
boolean |
exists()
Returns true if a Xing VBR header was found in the file passed to the constructor. |
int |
getAvgBitrate()
Returns the average bit rate of the mpeg file if a Xing header exists and -1 otherwise. |
int |
getLength()
Returns the length (in bytes) of this Xing VBR header. |
int |
getNumBytes()
Returns the number of data bytes in the mpeg frames. |
int |
getNumFrames()
Returns the number of MPEG frames in the file passed to the constructor. |
int |
getPlayingTime()
Returns the approximate playing time in seconds. |
byte[] |
getTOC()
Returns the toc used to seek to an area of this VBR file. |
int |
getVBRScale()
Returns the VBR scale used to generate this VBR file. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XingVBRHeader(ByteBuffer header,
int layer,
int mpegVersion,
int sampleRate,
int channelMode,
long filesize)
throws IOException
xingbytes - the bytes to read the xing header fromlayer - the layer value read by the
MPEGAudioFrameHeadermpegVersion - the version value read by the
MPEGAudioFrameHeadersampleRate - the sample rate read by the
MPEGAudioFrameHeaderchannelMode - the channel mode read by the
MPEGAudioFrameHeader
IOException - if an error occurs
CorruptHeaderException - if an error occurs| Method Detail |
|---|
public boolean exists()
public int getNumFrames()
public int getNumBytes()
public int getVBRScale()
public byte[] getTOC()
public int getLength()
protected void calc(int layer,
int mpegVersion,
int sampleRate)
layer - the layer value read by the MPEGAudioFrameHeadermpegVersion - the version value read by the MPEGAudioFrameHeadersampleRate - the sample rate read by the MPEGAudioFrameHeaderpublic int getAvgBitrate()
getAvgBitrate in interface VBRHeaderpublic int getPlayingTime()
VBRHeader
getPlayingTime in interface VBRHeaderpublic String toString()
toString in class Object
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||