You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.3 KiB

/*****************************************************************************
27 years ago
* audio_decoder.h : audio decoder thread interface
* (c)1999 VideoLAN
*****************************************************************************
27 years ago
* = Prototyped functions are implemented in audio_decoder/audio_decoder.c
*
* = Required headers :
* - "common.h" ( u32, byte_t, boolean_t )
* - "vlc_thread.h" ( vlc_thread_t )
27 years ago
* - "input.h" ( ts_packet_t, input_thread_t )
* - "decoder_fifo.h" ( decoder_fifo_t )
* - "audio_output.h" ( aout_fifo_t, aout_thread_t )
*
* = - LSb = Least Significant bit
* - LSB = Least Significant Byte
*
* = - MSb = Most Significant bit
* - MSB = Most Significant Byte
*****************************************************************************/
27 years ago
/*
* TODO :
* - Etudier /usr/include/asm/bitops.h d'un peu plus prs, bien qu'il ne me
* semble pas tre possible d'utiliser ces fonctions ici
* - N'y aurait-t-il pas moyen de se passer d'un buffer de bits, en travaillant
* directement sur le flux PES ?
*/
#define ADEC_FRAME_SIZE 384
/*****************************************************************************
* adec_frame_t
*****************************************************************************/
typedef s16 adec_frame_t[ ADEC_FRAME_SIZE ];
/*****************************************************************************
27 years ago
* adec_bank_t
*****************************************************************************/
27 years ago
typedef struct adec_bank_s
{
float v1[512];
float v2[512];
float * actual;
int pos;
} adec_bank_t;
/*****************************************************************************
27 years ago
* adec_thread_t : audio decoder thread descriptor
*****************************************************************************
27 years ago
* This type describes an audio decoder thread
*****************************************************************************/
27 years ago
typedef struct adec_thread_s
{
/*
* Thread properties
*/
vlc_thread_t thread_id; /* id for thread functions */
boolean_t b_die; /* `die' flag */
boolean_t b_error; /* `error' flag */
27 years ago
/*
* Input properties
*/
decoder_fifo_t fifo; /* stores the PES stream data */
27 years ago
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;
/*
* Decoder properties
*/
adec_bank_t bank_0;
adec_bank_t bank_1;
/*
* Output properties
*/
aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */
aout_thread_t * p_aout; /* needed to create the audio fifo */
27 years ago
} adec_thread_t;
/*****************************************************************************
27 years ago
* Prototypes
*****************************************************************************/
27 years ago
adec_thread_t * adec_CreateThread ( input_thread_t * p_input /* !! , aout_thread_t * p_aout !! */ );
void adec_DestroyThread ( adec_thread_t * p_adec );