public class MPEGFrameHeader extends Object
Modifier and Type | Field and Description |
---|---|
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 Map<Integer,String> |
modeMap
Constants for Channel mode
|
static Map<Integer,String> |
mpegLayerMap
Constants for MPEG Layer
|
static Map<Integer,String> |
mpegVersionMap
Constants for MPEG Version
|
static int |
SYNC_BIT_ANDSAMPING_BYTE3 |
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 |
Modifier and Type | Method and Description |
---|---|
Integer |
getBitRate() |
int |
getChannelMode() |
String |
getChannelModeAsString() |
int |
getEmphasis() |
String |
getEmphasisAsString() |
int |
getFrameLength() |
int |
getLayer()
Gets the layerVersion attribute of the MPEGFrame object
|
String |
getLayerAsString() |
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
|
Integer |
getSamplingRate() |
int |
getVersion()
Gets the mPEGVersion attribute of the MPEGFrame object
|
String |
getVersionAsString() |
boolean |
isCopyrighted() |
static boolean |
isMPEGFrame(ByteBuffer bb)
Gets the MPEGFrame attribute of the MPEGFrame object
|
boolean |
isOriginal() |
boolean |
isPadding() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isVariableBitRate() |
static MPEGFrameHeader |
parseMPEGHeader(ByteBuffer bb)
Parse the MPEGFrameHeader of an MP3File, file pointer returns at end of the frame header
|
String |
toString() |
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 int SYNC_BIT_ANDSAMPING_BYTE3
public static final int VERSION_2_5
public static final int VERSION_2
public static final int VERSION_1
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
public int getLayer()
public String getLayerAsString()
public int getNumberOfChannels()
public int getChannelMode()
public String getChannelModeAsString()
public int getVersion()
public String getVersionAsString()
public int getPaddingLength()
public Integer getBitRate()
public 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 String getEmphasisAsString()
public String getModeExtension()
public static MPEGFrameHeader parseMPEGHeader(ByteBuffer bb) throws InvalidAudioFrameException
bb
- the byte buffer containing the headerInvalidAudioFrameException
- if there is no header at this pointpublic static boolean isMPEGFrame(ByteBuffer bb)
bb
- Copyright © 2005–2020 jthink.net. All rights reserved.