|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.mp3.MPEGFrameHeader
public class MPEGFrameHeader
Represents a MPEGFrameHeader, an MP3 is made up of a number of frames each frame starts with a four byte frame header.
Field Summary | |
---|---|
static int |
EMPHASIS_5015MS
|
static int |
EMPHASIS_CCITT
|
static int |
EMPHASIS_NONE
|
static int |
EMPHASIS_RESERVED
|
static int |
HEADER_SIZE
|
static int |
LAYER_I
|
static int |
LAYER_I_SLOT_SIZE
Slot Size is dependent on Layer |
static int |
LAYER_II
|
static int |
LAYER_II_SLOT_SIZE
|
static int |
LAYER_III
|
static int |
LAYER_III_SLOT_SIZE
|
static int |
MODE_DUAL_CHANNEL
|
static int |
MODE_JOINT_STEREO
|
static int |
MODE_MONO
|
static int |
MODE_STEREO
|
static java.util.Map |
mpegLayerMap
Constants for MPEG Layer |
static java.util.Map |
mpegVersionMap
Constants for MPEG Version |
static int |
SYNC_BYTE1
|
static int |
SYNC_BYTE2
|
static int |
SYNC_SIZE
Sync Value to identify the start of an MPEGFrame |
static int |
VERSION_1
|
static int |
VERSION_2
|
static int |
VERSION_2_5
|
Method Summary | |
---|---|
java.lang.Integer |
getBitRate()
|
int |
getChannelMode()
|
java.lang.String |
getChannelModeAsString()
|
int |
getEmphasis()
|
java.lang.String |
getEmphasisAsString()
|
int |
getFrameLength()
|
int |
getLayer()
Gets the layerVersion attribute of the MPEGFrame object |
java.lang.String |
getLayerAsString()
|
java.lang.String |
getModeExtension()
|
int |
getNoOfSamples()
Get the number of samples in a frame, all frames in a file have a set number of samples as defined by their MPEG Versiona and Layer |
int |
getNumberOfChannels()
Gets the number of channels |
int |
getPaddingLength()
Gets the paddingLength attribute of the MPEGFrame object |
java.lang.Integer |
getSamplingRate()
|
int |
getVersion()
Gets the mPEGVersion attribute of the MPEGFrame object |
java.lang.String |
getVersionAsString()
|
boolean |
isCopyrighted()
|
static boolean |
isMPEGFrame(java.nio.ByteBuffer bb)
Gets the MPEGFrame attribute of the MPEGFrame object |
boolean |
isOriginal()
|
boolean |
isPadding()
|
boolean |
isPrivate()
|
boolean |
isProtected()
|
boolean |
isVariableBitRate()
|
static MPEGFrameHeader |
parseMPEGHeader(java.nio.ByteBuffer bb)
Parse the MPEGFrameHeader of an MP3File, file pointer returns at end of the frame header |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int HEADER_SIZE
public static final int SYNC_SIZE
public static final int SYNC_BYTE1
public static final int SYNC_BYTE2
public static final java.util.Map mpegVersionMap
public static final int VERSION_2_5
public static final int VERSION_2
public static final int VERSION_1
public static final java.util.Map mpegLayerMap
public static final int LAYER_I
public static final int LAYER_II
public static final int LAYER_III
public static final int LAYER_I_SLOT_SIZE
public static final int LAYER_II_SLOT_SIZE
public static final int LAYER_III_SLOT_SIZE
public static final int MODE_STEREO
public static final int MODE_JOINT_STEREO
public static final int MODE_DUAL_CHANNEL
public static final int MODE_MONO
public static final int EMPHASIS_NONE
public static final int EMPHASIS_5015MS
public static final int EMPHASIS_RESERVED
public static final int EMPHASIS_CCITT
Method Detail |
---|
public int getLayer()
public java.lang.String getLayerAsString()
public int getNumberOfChannels()
public int getChannelMode()
public java.lang.String getChannelModeAsString()
public int getVersion()
public java.lang.String getVersionAsString()
public int getPaddingLength()
public java.lang.Integer getBitRate()
public java.lang.Integer getSamplingRate()
public int getFrameLength()
public int getNoOfSamples()
public boolean isPadding()
public boolean isCopyrighted()
public boolean isOriginal()
public boolean isProtected()
public boolean isPrivate()
public boolean isVariableBitRate()
public int getEmphasis()
public java.lang.String getEmphasisAsString()
public java.lang.String getModeExtension()
public static MPEGFrameHeader parseMPEGHeader(java.nio.ByteBuffer bb) throws InvalidAudioFrameException
bb
- the byte buffer containing the header
InvalidAudioFrameException
- if there is no header at this pointpublic static boolean isMPEGFrame(java.nio.ByteBuffer bb)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |