|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.media.mp3.MP3ElementaryInputStream.Frame
public static class MP3ElementaryInputStream.Frame
An elementary frame.
| Constructor Summary | |
|---|---|
MP3ElementaryInputStream.Frame(int header)
Creates a new frame. |
|
| Method Summary | |
|---|---|
int |
getBitRate()
Returns the bitrate of the frame. |
int |
getBitRateCode()
Returns the raw bitrate code as it is stored in the header. |
long |
getBodyOffset()
Returns the offset of the frame body in the input stream. |
int |
getBodySize()
Returns the size of the frame body in bytes. |
int |
getChannelCount()
Returns the number of channels. |
int |
getChannelModeCode()
Returns the raw channel mode as stored in the header. |
int |
getCRC()
Returns the CRC of this frame. |
long |
getFrameOffset()
Returns the offset of the frame in the input stream. |
int |
getFrameSize()
Returns the size of the frame in bytes. |
int |
getHeader()
|
long |
getHeaderOffset()
Returns the offset of the header in the input stream. |
int |
getHeaderSize()
Returns the size of the header in bytes. |
int |
getLayer()
Returns the layer number. |
int |
getLayerCode()
Returns the raw layer code as it is stored in the header. |
int |
getPaddingSize()
Padding is used to fit the bit rates exactly. |
int |
getSampleCount()
Returns the number of samples in the frame. |
int |
getSampleRate()
Returns the sample rate in Hz. |
int |
getSampleRateCode()
Returns the raw sample rate code as it is stored in the header. |
int |
getSampleSize()
Returns the sample size in bits. |
long |
getSideInfoOffset()
Returns the offset of the side info in the input stream. |
int |
getSideInfoSize()
Returns the size of the side info in bytes. |
int |
getVersion()
Returns the version number: 1=MPEG 1, 2=MPEG 2, 25=MPEG 2.5; -1=unknown. |
int |
getVersionCode()
Returns the raw version code as it is stored in the header. |
boolean |
hasCRC()
Returns true if this frame has a CRC. |
boolean |
hasPadding()
|
byte[] |
headerToByteArray()
Returns the frame header as a byte array. |
int |
headerToByteArray(byte[] data,
int offset)
Writes the frame header into the specified byte array. |
void |
writeHeader(java.io.OutputStream out)
Writes the frame header into the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MP3ElementaryInputStream.Frame(int header)
header - The 32-bit Frame header| Method Detail |
|---|
public int getHeader()
public int getVersion()
public int getVersionCode()
public int getLayer()
public int getLayerCode()
public int getBitRate()
public int getBitRateCode()
public boolean hasCRC()
public int getCRC()
public boolean hasPadding()
public int getSampleRate()
public int getSampleRateCode()
public int getSampleCount()
public int getChannelCount()
public int getSampleSize()
public int getChannelModeCode()
public byte[] headerToByteArray()
public int headerToByteArray(byte[] data,
int offset)
public void writeHeader(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic long getFrameOffset()
public int getFrameSize()
public long getHeaderOffset()
public int getHeaderSize()
public long getSideInfoOffset()
public int getSideInfoSize()
public long getBodyOffset()
public int getBodySize()
public int getPaddingSize()
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||