2 * Copyright (C) 2003 Robert Shearman
3 * Copyright (C) 2008 Maarten Lankhorst
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 typedef struct _riffchunk
24 } RIFFCHUNK, * LPRIFFCHUNK;
26 typedef struct _rifflist
31 } RIFFLIST, * LPRIFFLIST;
33 #define FCC( ch0, ch1, ch2, ch3 ) \
34 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
35 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
37 #define RIFFROUND(cb) ((cb) + ((cb)&1))
38 #define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk)+sizeof(RIFFCHUNK)+RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
40 /* flags for dwFlags member of AVIMAINHEADER */
41 #define AVIF_HASINDEX 0x00000010
42 #define AVIF_MUSTUSEINDEX 0x00000020
43 #define AVIF_ISINTERLEAVED 0x00000100
44 #define AVIF_TRUSTCKTYPE 0x00000800
45 #define AVIF_WASCAPTUREFILE 0x00010000
46 #define AVIF_COPYRIGHTED 0x00020000
48 #define ckidMAINAVIHEADER FCC('a','v','i','h')
49 typedef struct _avimainheader
53 DWORD dwMicroSecPerFrame;
54 DWORD dwMaxBytesPerSec;
55 DWORD dwPaddingGranularity;
58 DWORD dwInitialFrames;
60 DWORD dwSuggestedBufferSize;
66 #define ckidODML FCC('o','d','m','l')
67 #define ckidAVIEXTHEADER FCC('d','m','l','h')
68 typedef struct _aviextheader
76 #define ckidSTREAMLIST FCC('s','t','r','l')
78 /* flags for dwFlags member of AVISTREAMHEADER */
79 #define AVISF_DISABLED 0x00000001
80 #define AVISF_VIDEO_PALCHANGES 0x00010000
82 #ifndef ckidSTREAMHEADER
83 #define ckidSTREAMHEADER FCC('s','t','r','h')
86 #ifndef streamtypeVIDEO
87 #define streamtypeVIDEO FCC('v','i','d','s')
88 #define streamtypeAUDIO FCC('a','u','d','s')
89 #define streamtypeMIDI FCC('m','i','d','s')
90 #define streamtypeTEXT FCC('t','x','t','s')
93 typedef struct _avistreamheader
102 DWORD dwInitialFrames;
107 DWORD dwSuggestedBufferSize;
119 #ifndef ckidSTREAMFORMAT
120 #define ckidSTREAMFORMAT FCC('s','t','r','f')
122 #define ckidAVIOLDINDEX FCC('i','d','x','1')
124 /* flags for dwFlags member of _avioldindex_entry */
125 #define AVIIF_LIST 0x00000001
126 #define AVIIF_KEYFRAME 0x00000010
127 #define AVIIF_NO_TIME 0x00000100
128 #define AVIIF_COMPRESSOR 0x0FFF0000
130 typedef struct _avioldindex
134 struct _avioldindex_entry
140 } aIndex[ANYSIZE_ARRAY];
143 typedef union _timecode
154 #define TIMECODE_RATE_30DROP 0
156 /* flags for dwSMPTEflags member of TIMECODEDATA */
157 #define TIMECODE_SMPTE_BINARY_GROUP 0x07
158 #define TIMECODE_SMPTE_COLOR_FRAME 0x08
160 typedef struct _timecodedata
167 #define AVI_INDEX_OF_INDEXES 0x00
168 #define AVI_INDEX_OF_CHUNKS 0x01
169 #define AVI_INDEX_OF_TIMED_CHUNKS 0x02
170 #define AVI_INDEX_OF_SUB_2FIELD 0x03
171 #define AVI_INDEX_IS_DATA 0x80
173 #define AVI_INDEX_SUB_DEFAULT 0x00
174 #define AVI_INDEX_SUB_2FIELD 0x01
176 typedef struct _avimetaindex
186 DWORD adwIndex[ANYSIZE_ARRAY];
189 #define ckidAVISUPERINDEX FCC('i','n','d','x')
190 typedef struct _avisuperindex {
199 struct _avisuperindex_entry {
203 } aIndex[ANYSIZE_ARRAY];
206 #define AVISTDINDEX_DELTAFRAME (0x80000000)
207 #define AVISTDINDEX_SIZEMASK (~0x80000000)
209 typedef struct _avistdindex_entry {
214 typedef struct _avistdindex {
222 DWORDLONG qwBaseOffset;
224 AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
227 typedef struct _avitimedindex_entry {
231 } AVITIMEDINDEX_ENTRY;
233 typedef struct _avitimedindex {
241 DWORDLONG qwBaseOffset;
243 AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
244 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
247 typedef struct _avitimecodeindex {
256 TIMECODEDATA aIndex[ANYSIZE_ARRAY];
259 typedef struct _avitcdlindex_entryA {
265 } AVITCDLINDEX_ENTRYA;
267 typedef struct _avitcdlindex_entryW {
273 } AVITCDLINDEX_ENTRYW;
275 typedef struct _avitcdlindexA {
284 AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY];
285 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
288 typedef struct _avitcdlindexW {
297 AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY];
298 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
301 #define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY)
302 #define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX)
304 typedef struct _avifieldindex_chunk {
312 DWORDLONG qwBaseOffset;
314 struct _avifieldindex_entry {
317 DWORD dwOffsetField2;
318 } aIndex[ANYSIZE_ARRAY];
319 } AVIFIELDINDEX, * PAVIFIELDINDEX;