]> git.sesse.net Git - vlc/blob - modules/demux/avi/avi.h
958c06463f0ed13e2bd608e3050de4fb251bd94e
[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.5 2002/10/27 15:37:16 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 typedef struct avi_packet_s
25 {
26     u32     i_fourcc;
27     off_t   i_pos;
28     u32     i_size;
29     u32     i_type;     // only for AVIFOURCC_LIST
30     
31     u8      i_peek[8];  //first 8 bytes
32
33     int     i_stream;
34     int     i_cat;
35 } avi_packet_t;
36
37
38 typedef struct AVIIndexEntry_s
39 {
40     u32 i_id;
41     u32 i_flags;
42     u32 i_pos;
43     u32 i_length;
44     u32 i_lengthtotal;
45
46 } AVIIndexEntry_t;
47
48 typedef struct avi_stream_s
49 {
50     int i_activated;
51
52     int i_cat;           /* AUDIO_ES, VIDEO_ES */
53     vlc_fourcc_t    i_fourcc;
54     vlc_fourcc_t    i_codec;
55
56     int             i_rate;
57     int             i_scale;
58     int             i_samplesize;
59     
60     es_descriptor_t     *p_es;
61
62     AVIIndexEntry_t     *p_index;
63     int                 i_idxnb;
64     int                 i_idxmax; 
65
66     int                 i_idxposc;  /* numero of chunk */
67     int                 i_idxposb;  /* byte in the current chunk */
68
69 } avi_stream_t;
70
71 struct demux_sys_t
72 {
73     mtime_t i_time;
74     mtime_t i_length;
75     mtime_t i_pcr; 
76
77     int     b_seekable;
78     avi_chunk_t ck_root;
79     
80     off_t   i_movi_begin;
81     off_t   i_movi_lastchunk_pos; /* XXX position of last valid chunk */
82     
83     /* number of stream and informations*/
84     int i_streams;
85     avi_stream_t  **pp_info; 
86
87 };
88