1 /***************************************************************************
2 mad_adec.h - description
5 copyright : (C) 2001 by Jean-Paul Saman
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef _VLC_MAD_ADEC_H_
19 #define _VLC_MAD_ADEC_H_
20 /*****************************************************************************
21 * mad_adec_thread_t : mad decoder thread descriptor
22 *****************************************************************************/
24 // FIXME: Ugly define inside a decoder
25 #define ADEC_FRAME_SIZE (2*1152)
26 #define MAD_BUFFER_SIZE (ADEC_FRAME_SIZE*2)
27 //#define MAD_BUFFER_SIZE (MAD_BUFFER_MDLEN*2)
28 #define MAD_OUTPUT_SIZE (ADEC_FRAME_SIZE*2)
30 typedef struct mad_adec_thread_s
35 struct mad_decoder *libmad_decoder;
36 mad_timer_t libmad_timer;
37 byte_t buffer[MAD_BUFFER_SIZE];
42 vlc_thread_t thread_id; /* id for thread functions */
47 decoder_fifo_t * p_fifo; /* stores the PES stream data */
48 /* The bit stream structure handles the PES stream at the bit level */
49 bit_stream_t bit_stream;
50 decoder_config_t * p_config;
52 /* Store i_pts for syncing audio frames */
58 aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */
62 /*****************************************************************************
64 *****************************************************************************/
65 vlc_thread_t mad_adec_CreateThread( decoder_config_t * p_config );