Logo Search packages:      
Sourcecode: jampal version File versions  Download package

Public Member Functions | Static Public Attributes | Package Attributes | Private Member Functions | Private Attributes

pgbennett::id3::MPEGAudioFrameHeader Class Reference

Collaboration diagram for pgbennett::id3::MPEGAudioFrameHeader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int getBitRate ()
String getChannelMode ()
String getEmphasis ()
int getFrameLength ()
String getLayer ()
long getLocation ()
int getNumFrames ()
int getSampleRate ()
int getVBRPlayingTime ()
String getVersion ()
boolean hasPadding ()
boolean isCopyrighted ()
boolean isMP3 ()
boolean isOriginal ()
boolean isProtected ()
boolean isVBR ()
 MPEGAudioFrameHeader (File mp3) throws NoMPEGFramesException, FileNotFoundException, IOException, CorruptHeaderException
 MPEGAudioFrameHeader (File mp3, long offset) throws NoMPEGFramesException, FileNotFoundException, IOException, CorruptHeaderException
boolean privateBitSet ()
String toString ()

Static Public Attributes

static final int MONO_MODE = 3
static final int MPEG_L_1 = 3
static final int MPEG_L_2 = 2
static final int MPEG_L_3 = 1
static final int MPEG_V_1 = 3
static final int MPEG_V_2 = 2
static final int MPEG_V_25 = 0

Package Attributes

MP3Info mp3Info

Private Member Functions

void findBitRate (int bitrateIndex)
long findOffset (RandomAccessFile in, long offset) throws CorruptHeaderException, IOException
void findSampleRate (int sampleIndex)
void readHeader (RandomAccessFile raf, long location) throws IOException, CorruptHeaderException

Private Attributes

int bitRate
final int[][] bitrateTable
final String[] channelLabels
int channelMode
boolean copyrighted
boolean crced
int emphasis
final String[] emphasisLabels
int frameLength
final int HEADER_SIZE = 4
int layer
final String[] layerLabels
long location
final int MAX_TRIES = 9
File mp3 = null
boolean original
boolean padding
boolean privateBit
int sampleRate
final int[][] sampleTable
final int[] slotLength = {-1, 1, 1, 4}
final String TAG_START = "ID3"
int version
final String[] versionLabels
XingVBRHeader xingHead = null

Detailed Description

This class reads through the file specified and tries to find an mpeg frame. It then reads data from the header of the first frame encountered.

Version History
1.8 - 2002.10/20 by Tech
Fixed some bugs when detecting the first MPEG frame
1.7.1 - 2002.10/17 by gruni
Made Sourcecode compliant to the Sun CodingConventions
1.7 - 2002/02/25 by helliker
-Implemented a much better mpeg identification algorithm. -Added method for computing number of frames.
1.6 - 2002/02/03 by helliker
-New algorithm for determining presence of 1st frame. -More checks to ensure stability.
1.5 - 2002/01/22 by helliker
-Made stupid mistake that causes an infininte recursive loop when reading non-VBR files.
1.4 - 2002/01/21 by helliker
-Added support for VBR files. -Added fields for padding and private bits. -Added getFrameLength method.
1.3 - 2001/11/10 by helliker
-Fixed file handle leaks. -Added accessor to find the offset of the MPEG data.
1.2 - 2001/10/19 by helliker
All set for release.
Author:
Jonathan Hilliker
Version:
1.8

Definition at line 69 of file MPEGAudioFrameHeader.java.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index