#include "global.h"
#include <stdlib.h>
#include "bit.h"
#include "stream.h"

Go to the source code of this file.
Functions | |
| void | mad_stream_init (struct mad_stream *stream) |
| Initializes stream struct. | |
| void | mad_stream_finish (struct mad_stream *stream) |
| Deallocates any dynamic memory associated with stream. | |
| void | mad_stream_buffer (struct mad_stream *stream, unsigned char const *buffer, unsigned long length) |
| Sets stream buffer pointers. | |
| void | mad_stream_skip (struct mad_stream *stream, unsigned long length) |
| Arranges to skip bytes before the next frame. | |
| int | mad_stream_sync (struct mad_stream *stream) |
| Locates the next stream sync word. | |
| char const * | mad_stream_errorstr (struct mad_stream const *stream) |
| Returns a string description of the current error condition. | |
Definition in file stream.c.
| void mad_stream_buffer | ( | struct mad_stream * | stream, | |
| unsigned char const * | buffer, | |||
| unsigned long | length | |||
| ) |
Sets stream buffer pointers.
Definition at line 80 of file stream.c.
References mad_stream::bufend, mad_stream::buffer, mad_bit_init(), mad_stream::next_frame, mad_stream::ptr, mad_stream::sync, and mad_stream::this_frame.
Referenced by input().

| char const* mad_stream_errorstr | ( | struct mad_stream const * | stream | ) |
Returns a string description of the current error condition.
Definition at line 127 of file stream.c.
References mad_stream::error, MAD_ERROR_BADBIGVALUES, MAD_ERROR_BADBITALLOC, MAD_ERROR_BADBITRATE, MAD_ERROR_BADBLOCKTYPE, MAD_ERROR_BADCRC, MAD_ERROR_BADDATAPTR, MAD_ERROR_BADEMPHASIS, MAD_ERROR_BADFRAMELEN, MAD_ERROR_BADHUFFDATA, MAD_ERROR_BADHUFFTABLE, MAD_ERROR_BADLAYER, MAD_ERROR_BADMODE, MAD_ERROR_BADPART3LEN, MAD_ERROR_BADSAMPLERATE, MAD_ERROR_BADSCALEFACTOR, MAD_ERROR_BADSCFSI, MAD_ERROR_BADSTEREO, MAD_ERROR_BUFLEN, MAD_ERROR_BUFPTR, MAD_ERROR_LOSTSYNC, MAD_ERROR_NOMEM, and MAD_ERROR_NONE.
Referenced by error().
| void mad_stream_finish | ( | struct mad_stream * | stream | ) |
Deallocates any dynamic memory associated with stream.
Definition at line 66 of file stream.c.
References mad_stream::anc_ptr, mad_bit_finish, mad_stream::main_data, and mad_stream::ptr.
Referenced by run_sync().
| void mad_stream_init | ( | struct mad_stream * | stream | ) |
Initializes stream struct.
Definition at line 40 of file stream.c.
References mad_stream::anc_bitlen, mad_stream::anc_ptr, mad_stream::bufend, mad_stream::buffer, mad_stream::error, mad_stream::freerate, mad_bit_init(), MAD_ERROR_NONE, mad_stream::main_data, mad_stream::md_len, mad_stream::next_frame, mad_stream::options, mad_stream::ptr, mad_stream::skiplen, mad_stream::sync, and mad_stream::this_frame.
Referenced by run_sync().

| void mad_stream_skip | ( | struct mad_stream * | stream, | |
| unsigned long | length | |||
| ) |
Arranges to skip bytes before the next frame.
Definition at line 97 of file stream.c.
References mad_stream::skiplen.
| int mad_stream_sync | ( | struct mad_stream * | stream | ) |
Locates the next stream sync word.
Definition at line 105 of file stream.c.
References mad_stream::bufend, mad_bit_init(), mad_bit_nextbyte(), MAD_BUFFER_GUARD, and mad_stream::ptr.
Referenced by free_bitrate(), and mad_header_decode().

1.5.5