]> git.sesse.net Git - vlc/blob - plugins/mad/mad_adec.h
c5214e12b7b87add16c35ed32f471ae2e239929a
[vlc] / plugins / mad / mad_adec.h
1 /***************************************************************************
2              mad_adec.h  -  description
3                 -------------------
4     begin                : Mon Nov 5 2001
5     copyright            : (C) 2001 by Jean-Paul Saman
6     email                : jpsaman@wxs.nl
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
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.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef _VLC_MAD_ADEC_H_
19 #define _VLC_MAD_ADEC_H_
20
21 /*****************************************************************************
22  * mad_adec_thread_t : mad decoder thread descriptor
23  *****************************************************************************/
24
25 enum mad_scaling { FAST_SCALING, MPG321_SCALING };
26
27 typedef struct mad_adec_thread_s
28 {
29     /*
30      * Decoder properties
31      */
32     struct mad_decoder *libmad_decoder;
33     mad_timer_t         libmad_timer;  
34     byte_t              buffer[MAD_BUFFER_MDLEN];
35    
36     /*
37      * Thread properties
38      */
39     vlc_thread_t        thread_id;                /* id for thread functions */
40
41     /*
42      * Input properties
43      */
44     decoder_fifo_t *    p_fifo;                /* stores the PES stream data */
45     data_packet_t *     p_data;
46     decoder_config_t *  p_config;
47
48     /* Store i_pts for syncing audio frames */
49     mtime_t             i_current_pts, i_next_pts;
50
51     /*
52      * Output properties
53      */
54     aout_fifo_t *       p_aout_fifo; /* stores the decompressed audio frames */
55     enum mad_scaling      audio_scaling;
56
57 } mad_adec_thread_t;
58
59 /*****************************************************************************
60  * Prototypes
61  *****************************************************************************/
62 vlc_thread_t            mad_adec_CreateThread( decoder_config_t * p_config );
63
64 #endif