]> git.sesse.net Git - vlc/blob - modules/demux/avi/avi.h
8886a8c9f735db4ec9cbe1086389d88232c55121
[vlc] / modules / demux / avi / avi.h
1 /*****************************************************************************
2  * avi.h : AVI file Stream input module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: avi.h,v 1.7 2002/11/15 18:10:26 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 typedef struct avi_packet_s
24 {
25     vlc_fourcc_t i_fourcc;
26     off_t        i_pos;
27     uint32_t     i_size;
28     vlc_fourcc_t i_type;     // only for AVIFOURCC_LIST
29     
30     uint8_t  i_peek[8];  //first 8 bytes
31
32     int      i_stream;
33     int      i_cat;
34 } avi_packet_t;
35
36
37 typedef struct AVIIndexEntry_s
38 {
39     vlc_fourcc_t i_id;
40     uint32_t     i_flags;
41     uint32_t     i_pos;
42     uint32_t     i_length;
43     uint32_t     i_lengthtotal;
44
45 } AVIIndexEntry_t;
46
47 typedef struct avi_stream_s
48 {
49     vlc_bool_t      b_activated;
50
51     int i_cat;           /* AUDIO_ES, VIDEO_ES */
52     vlc_fourcc_t    i_fourcc;
53     vlc_fourcc_t    i_codec;
54
55     int             i_rate;
56     int             i_scale;
57     int             i_samplesize;
58     
59     es_descriptor_t     *p_es;
60
61     AVIIndexEntry_t     *p_index;
62     int                 i_idxnb;
63     int                 i_idxmax; 
64
65     int                 i_idxposc;  /* numero of chunk */
66     int                 i_idxposb;  /* byte in the current chunk */
67
68 } avi_stream_t;
69
70 struct demux_sys_t
71 {
72     mtime_t i_time;
73     mtime_t i_length;
74     mtime_t i_pcr; 
75
76     vlc_bool_t  b_seekable;
77     avi_chunk_t ck_root;
78     
79     off_t   i_movi_begin;
80     off_t   i_movi_lastchunk_pos; /* XXX position of last valid chunk */
81     
82     /* number of streams and information */
83     int i_streams;
84     avi_stream_t  **pp_info; 
85
86 #ifdef __AVI_SUBTITLE__
87     subtitle_demux_t    *p_sub;
88 #endif
89     
90 };
91