]> git.sesse.net Git - vlc/blob - modules/demux/wav/wav.h
* araw.c : pseudo pcm decoder
[vlc] / modules / demux / wav / wav.h
1 /*****************************************************************************
2  * wav.h : wav file input module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: wav.h,v 1.1 2002/10/14 21:59:44 fenrir Exp $
6  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7  * 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
21  *****************************************************************************/
22
23
24
25 /*****************************************************************************
26  * Structure needed for decoder
27  *****************************************************************************/
28 typedef struct waveformatex_s
29 {
30     u16 i_format;
31     u16 i_channels;
32     u32 i_samplepersec;
33     u32 i_avgbytespersec;
34     u16 i_blockalign;
35     u16 i_bitspersample;
36     u16 i_size;          /* This give size of data 
37                             imediatly following this header. */
38     u8  *p_data;
39 } waveformatex_t;
40
41
42 /*****************************************************************************
43  *
44  *****************************************************************************/
45 struct demux_sys_t
46 {
47
48     mtime_t         i_pcr;
49     mtime_t         i_time;
50     
51     vlc_fourcc_t    i_fourcc;
52     es_descriptor_t *p_es;
53
54     waveformatex_t  format;
55
56     int             i_wf;  /* taille de p_wf */
57     u8              *p_wf; /* waveformatex_t as store in file */
58    
59     off_t           i_data_pos;
60     u64             i_data_size;
61
62     /* Two case:
63         - we have an internal demux(pcm)
64         - we use an external demux(mp3, a52 ..)
65     */
66     
67     /* module for external demux */
68     module_t        *p_demux;
69     int             (*pf_demux)( input_thread_t * );
70     void            *p_demux_data;
71     char            *psz_demux;
72
73     /* getframe for internal demux */
74     int (*GetFrame)( input_thread_t *p_input, 
75                      waveformatex_t *p_wf,
76                      pes_packet_t **pp_pes,
77                      mtime_t *pi_length );
78      
79 };
80
81
82