Logo Search packages:      
Sourcecode: libjlayer-java version File versions  Download package

javazoom::jl::decoder::Bitstream Class Reference

Inheritance diagram for javazoom::jl::decoder::Bitstream:

javazoom::jl::decoder::BitstreamErrors javazoom::jl::decoder::JavaLayerErrors

List of all members.


Detailed Description

The Bistream class is responsible for parsing an MPEG audio bitstream.

REVIEW: much of the parsing currently occurs in the various decoders. This should be moved into this class and associated inner classes.

Definition at line 53 of file Bitstream.java.


Public Member Functions

 Bitstream (InputStream in)
void close () throws BitstreamException
void closeFrame ()
int get_bits (int number_of_bits)
InputStream getRawID3v2 ()
int header_pos ()
boolean isSyncCurrentPosition (int syncmode) throws BitstreamException
boolean isSyncMark (int headerstring, int syncmode, int word)
int readBits (int n)
int readCheckedBits (int n)
Header readFrame () throws BitstreamException
void unreadFrame () throws BitstreamException

Static Public Attributes

static final int BITSTREAM_ERROR = 0x100
static final int BITSTREAM_LAST = 0x1ff
static final int DECODER_ERROR = 0x200
static final int INVALIDFRAME = BITSTREAM_ERROR + 5
static final int STREAM_EOF = BITSTREAM_ERROR + 4
static final int STREAM_ERROR = BITSTREAM_ERROR + 2
static final int UNEXPECTED_EOF = BITSTREAM_ERROR + 3
static final int UNKNOWN_ERROR = BITSTREAM_ERROR + 0
static final int UNKNOWN_SAMPLE_RATE = BITSTREAM_ERROR + 1

Protected Member Functions

BitstreamException newBitstreamException (int errorcode, Throwable throwable)
BitstreamException newBitstreamException (int errorcode)

Package Functions

void parse_frame () throws BitstreamException
int read_frame_data (int bytesize) throws BitstreamException
void set_syncword (int syncword0)
int syncHeader (byte syncmode) throws BitstreamException

Static Package Attributes

static byte INITIAL_SYNC = 0
static byte STRICT_SYNC = 1

Private Member Functions

void loadID3v2 (InputStream in)
void nextFrame () throws BitstreamException
int readBytes (byte[] b, int offs, int len) throws BitstreamException
int readFully (byte[] b, int offs, int len) throws BitstreamException
int readID3v2Header (InputStream in) throws IOException
Header readNextFrame () throws BitstreamException

Private Attributes

int bitindex
final int bitmask []
Crc16[] crc = new Crc16[1]
boolean firstframe = true
byte[] frame_bytes = new byte[BUFFER_INT_SIZE*4]
final int[] framebuffer = new int[BUFFER_INT_SIZE]
int framesize
final Header header = new Header()
int header_pos = 0
byte[] rawid3v2 = null
boolean single_ch_mode
final PushbackInputStream source
final byte syncbuf [] = new byte[4]
int syncword
int wordpointer

Static Private Attributes

static final int BUFFER_INT_SIZE = 433

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

Generated by  Doxygen 1.6.0   Back to index