|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.neoworks.mpeg.XingVBRHeader
Reads information from a Xing variable bitrate info header. Thanks to the Scilla project (http://www.xs4all.nl/~rwvtveer/scilla/) for code ideas.
Constructor Summary | |
XingVBRHeader(byte[] data,
long offset,
int layer,
int mpegVersion,
int sampleRate,
int channelMode)
Looks for a Xing VBR header in the file. |
Method Summary | |
int |
getAvgBitrate()
Returns the average bit rate of the mpeg file if a Xing header exists and -1 otherwise. |
int |
getHeaderOffset()
Get the offset from the end of the MPEG header to the beginning of the VBR header in bytes |
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 calculated playing time of the mpeg file if a Xing header exists and -1 otherwise. |
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. |
boolean |
headerExists()
Returns true if a Xing VBR header was found in the file passed to the constructor. |
java.lang.String |
toString()
Return 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(byte[] data, long offset, int layer, int mpegVersion, int sampleRate, int channelMode)
data
- The MPEG frame data to extract the header fromoffset
- the location of the first mpeg framelayer
- 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 MPEGAudioFrameHeaderMethod Detail |
public boolean headerExists()
public int getNumFrames()
public int getNumBytes()
public int getVBRScale()
public byte[] getTOC()
public int getAvgBitrate()
public int getHeaderOffset()
public int getPlayingTime()
public java.lang.String toString()
toString
in class java.lang.Object
public int getLength()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |