]> git.sesse.net Git - vlc/blob - src/ac3_spdif/ac3_spdif.h
9f9fdd278f3293a7c2dd03f7cc3b96be5b6b9c80
[vlc] / src / ac3_spdif / ac3_spdif.h
1 /*****************************************************************************
2  * ac3_spdif.h: header for ac3 pass-through
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: ac3_spdif.h,v 1.2 2001/05/01 04:18:18 sam Exp $
6  *
7  * Authors: Stéphane Borel <stef@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  ****************************************************************************/
23
24 #define SPDIF_FRAME_SIZE 6144
25
26 typedef struct ac3_info_s
27 {
28     int i_bit_rate;
29     int i_frame_size;
30     int i_sample_rate;
31     int i_bs_mod;
32 } ac3_info_t;
33
34 /*****************************************************************************
35  * ac3_spdif_thread_t : ac3 pass-through thread descriptor
36  *****************************************************************************/
37 typedef struct ac3_spdif_thread_s
38 {
39     /*
40      * Thread properties
41      */
42     vlc_thread_t        thread_id;                /* id for thread functions */
43
44     /*
45      * Input properties
46      */
47     decoder_fifo_t *    p_fifo;                /* stores the PES stream data */
48     adec_config_t *     p_config;
49
50     /* The bit stream structure handles the PES stream at the bit level */
51     bit_stream_t        bit_stream;
52     int                 i_available;
53
54     /*
55      * Decoder properties
56      */
57     ac3_info_t          ac3_info;
58     u8 *                p_ac3;
59     u8 *                p_iec;
60
61     /*
62      * Output properties
63      */
64     aout_fifo_t *       p_aout_fifo; /* stores the decompressed audio frames */
65
66 } ac3_spdif_thread_t;
67
68 /*****************************************************************************
69  * Prototypes
70  *****************************************************************************/
71 vlc_thread_t    spdif_CreateThread( adec_config_t * p_config );
72