#include "global.h"
#include <stdlib.h>
#include "stream.h"
#include "frame.h"
#include "synth.h"
#include "decoder.h"
Go to the source code of this file.
Functions | |
void | mad_decoder_init (struct mad_decoder *decoder, void *data, input_callback input_func, header_callback header_func, filter_callback filter_func, output_callback output_func, error_callback error_func, message_callback message_func) |
initialize a decoder object with callback routines. | |
int | mad_decoder_finish (struct mad_decoder *decoder) |
static enum mad_flow | error_default (void *data, struct mad_stream *stream, struct mad_frame *frame) |
static int | run_sync (struct mad_decoder *decoder) |
int | mad_decoder_run (struct mad_decoder *decoder, enum mad_decoder_mode mode) |
run the decoder thread either synchronously or asynchronously. | |
int | mad_decoder_message (struct mad_decoder *decoder, void *message, unsigned int *len) |
send a message to and receive a reply from the decoder process. |
Definition in file decoder.c.
static enum mad_flow error_default | ( | void * | data, | |
struct mad_stream * | stream, | |||
struct mad_frame * | frame | |||
) | [static] |
Definition at line 290 of file decoder.c.
References mad_stream::error, MAD_ERROR_BADCRC, MAD_FLOW_CONTINUE, MAD_FLOW_IGNORE, and mad_frame_mute().
Referenced by run_sync().
int mad_decoder_finish | ( | struct mad_decoder * | decoder | ) |
Definition at line 90 of file decoder.c.
References mad_decoder::async, mad_decoder::in, MAD_DECODER_MODE_ASYNC, mad_decoder::mode, mad_decoder::out, and mad_decoder::pid.
Referenced by decode().
void mad_decoder_init | ( | struct mad_decoder * | decoder, | |
void * | data, | |||
input_callback | input_func, | |||
header_callback | header_func, | |||
filter_callback | filter_func, | |||
output_callback | output_func, | |||
error_callback | error_func, | |||
message_callback | message_func | |||
) |
initialize a decoder object with callback routines.
Definition at line 62 of file decoder.c.
References mad_decoder::async, mad_decoder::cb_data, mad_decoder::error_func, mad_decoder::filter_func, mad_decoder::header_func, mad_decoder::in, mad_decoder::input_func, mad_decoder::message_func, mad_decoder::mode, mad_decoder::options, mad_decoder::out, mad_decoder::output_func, mad_decoder::pid, and mad_decoder::sync.
Referenced by decode().
int mad_decoder_message | ( | struct mad_decoder * | decoder, | |
void * | message, | |||
unsigned int * | len | |||
) |
send a message to and receive a reply from the decoder process.
Definition at line 561 of file decoder.c.
References mad_decoder::async, mad_decoder::in, MAD_DECODER_MODE_ASYNC, MAD_FLOW_CONTINUE, mad_decoder::mode, and mad_decoder::out.
int mad_decoder_run | ( | struct mad_decoder * | decoder, | |
enum mad_decoder_mode | mode | |||
) |
run the decoder thread either synchronously or asynchronously.
Definition at line 526 of file decoder.c.
References MAD_DECODER_MODE_ASYNC, MAD_DECODER_MODE_SYNC, mad_decoder::mode, run_sync(), and mad_decoder::sync.
Referenced by decode().
static int run_sync | ( | struct mad_decoder * | decoder | ) | [static] |
Definition at line 310 of file decoder.c.
References mad_decoder::cb_data, mad_stream::error, error_callback, error_default(), mad_decoder::error_func, mad_decoder::filter_func, mad_decoder::frame, mad_frame::header, mad_decoder::header_func, mad_decoder::input_func, MAD_DECODER_MODE_ASYNC, MAD_ERROR_BUFLEN, MAD_FLOW_BREAK, MAD_FLOW_CONTINUE, MAD_FLOW_IGNORE, MAD_FLOW_STOP, mad_frame_decode(), mad_frame_finish(), mad_frame_init(), mad_header_decode(), MAD_RECOVERABLE, mad_stream_finish(), mad_stream_init(), mad_stream_options, mad_synth_finish, mad_synth_frame(), mad_synth_init(), mad_decoder::mode, mad_decoder::options, mad_decoder::output_func, mad_synth::pcm, mad_decoder::stream, mad_decoder::sync, and mad_decoder::synth.
Referenced by mad_decoder_run().