decoder.c File Reference

Definition of the mad_decoder engine, the core of libmad library. More...

#include "global.h"
#include <stdlib.h>
#include "stream.h"
#include "frame.h"
#include "synth.h"
#include "decoder.h"

Include dependency graph for decoder.c:

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.


Detailed Description

Definition of the mad_decoder engine, the core of libmad library.

Definition in file decoder.c.


Function Documentation

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().

Here is the call graph for this function:

int mad_decoder_finish ( struct mad_decoder decoder  ) 

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 
)

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().

Here is the call graph for this function:

static int run_sync ( struct mad_decoder decoder  )  [static]


Generated on Tue Jun 10 12:14:17 2008 for libmad by  doxygen 1.5.5