decoder.h File Reference

Declaration of the mad_decoder structure and methods, the core of libmad library. More...

#include "stream.h"
#include "frame.h"
#include "synth.h"
#include "callbacks.h"

Include dependency graph for decoder.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mad_decoder
 This holds all information about how you want your stream decoded, such as input/output functions, error handling functions, etc. More...

Defines

#define mad_decoder_options(decoder, opts)   ((void) ((decoder)->options = (opts)))

Enumerations

enum  mad_decoder_mode { MAD_DECODER_MODE_SYNC = 0, MAD_DECODER_MODE_ASYNC }
enum  mad_flow { MAD_FLOW_CONTINUE = 0x0000, MAD_FLOW_STOP = 0x0010, MAD_FLOW_BREAK = 0x0011, MAD_FLOW_IGNORE = 0x0020 }

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 *)
int mad_decoder_run (struct mad_decoder *, enum mad_decoder_mode)
 run the decoder thread either synchronously or asynchronously.
int mad_decoder_message (struct mad_decoder *, void *, unsigned int *)
 send a message to and receive a reply from the decoder process.


Detailed Description

Declaration of the mad_decoder structure and methods, the core of libmad library.

Definition in file decoder.h.


Define Documentation

#define mad_decoder_options ( decoder,
opts   )     ((void) ((decoder)->options = (opts)))

Definition at line 87 of file decoder.h.


Enumeration Type Documentation

Enumerator:
MAD_DECODER_MODE_SYNC 
MAD_DECODER_MODE_ASYNC 

Definition at line 33 of file decoder.h.

enum mad_flow

Enumerator:
MAD_FLOW_CONTINUE  continue normally
MAD_FLOW_STOP  stop decoding normally
MAD_FLOW_BREAK  stop decoding and signal an error
MAD_FLOW_IGNORE  ignore the current frame

Definition at line 38 of file decoder.h.


Function Documentation

int mad_decoder_finish ( struct mad_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 ,
void *  ,
unsigned int *   
)

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 ,
enum  mad_decoder_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:


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