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
21
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
23
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24
* a choice of LGPL license versions is made available with the language indicating
25
* that LGPLv2 or any later version may be used, or where a choice of which version
26
* of the LGPL is applied is otherwise unspecified.
29
/* All definitions here are packed structures of on-disk formats */
32
typedef struct _riffchunk
36
} RIFFCHUNK, * LPRIFFCHUNK;
38
typedef struct _rifflist
43
} RIFFLIST, * LPRIFFLIST;
45
#define FCC( ch0, ch1, ch2, ch3 ) \
46
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
47
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
49
#define RIFFROUND(cb) ((cb) + ((cb)&1))
50
#define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk)+sizeof(RIFFCHUNK)+RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
52
/* flags for dwFlags member of AVIMAINHEADER */
53
#define AVIF_HASINDEX 0x00000010
54
#define AVIF_MUSTUSEINDEX 0x00000020
55
#define AVIF_ISINTERLEAVED 0x00000100
56
#define AVIF_TRUSTCKTYPE 0x00000800
57
#define AVIF_WASCAPTUREFILE 0x00010000
58
#define AVIF_COPYRIGHTED 0x00020000
60
#define ckidMAINAVIHEADER FCC('a','v','i','h')
61
typedef struct _avimainheader
65
DWORD dwMicroSecPerFrame;
66
DWORD dwMaxBytesPerSec;
67
DWORD dwPaddingGranularity;
70
DWORD dwInitialFrames;
72
DWORD dwSuggestedBufferSize;
78
#define ckidODML FCC('o','d','m','l')
79
#define ckidAVIEXTHEADER FCC('d','m','l','h')
80
typedef struct _aviextheader
88
#define ckidSTREAMLIST FCC('s','t','r','l')
90
/* flags for dwFlags member of AVISTREAMHEADER */
91
#define AVISF_DISABLED 0x00000001
92
#define AVISF_VIDEO_PALCHANGES 0x00010000
94
#ifndef ckidSTREAMHEADER
95
#define ckidSTREAMHEADER FCC('s','t','r','h')
98
#ifndef streamtypeVIDEO
99
#define streamtypeVIDEO FCC('v','i','d','s')
100
#define streamtypeAUDIO FCC('a','u','d','s')
101
#define streamtypeMIDI FCC('m','i','d','s')
102
#define streamtypeTEXT FCC('t','x','t','s')
105
typedef struct _avistreamheader
114
DWORD dwInitialFrames;
119
DWORD dwSuggestedBufferSize;
131
#ifndef ckidSTREAMFORMAT
132
#define ckidSTREAMFORMAT FCC('s','t','r','f')
134
#define ckidAVIOLDINDEX FCC('i','d','x','1')
136
/* flags for dwFlags member of _avioldindex_entry */
137
#define AVIIF_LIST 0x00000001
138
#define AVIIF_KEYFRAME 0x00000010
139
#define AVIIF_NO_TIME 0x00000100
140
#define AVIIF_COMPRESSOR 0x0FFF0000
142
typedef struct _avioldindex
146
struct _avioldindex_entry
152
} aIndex[ANYSIZE_ARRAY];
155
typedef union _timecode
166
#define TIMECODE_RATE_30DROP 0
168
/* flags for dwSMPTEflags member of TIMECODEDATA */
169
#define TIMECODE_SMPTE_BINARY_GROUP 0x07
170
#define TIMECODE_SMPTE_COLOR_FRAME 0x08
172
typedef struct _timecodedata
179
#define AVI_INDEX_OF_INDEXES 0x00
180
#define AVI_INDEX_OF_CHUNKS 0x01
181
#define AVI_INDEX_OF_TIMED_CHUNKS 0x02
182
#define AVI_INDEX_OF_SUB_2FIELD 0x03
183
#define AVI_INDEX_IS_DATA 0x80
185
#define AVI_INDEX_SUB_DEFAULT 0x00
186
#define AVI_INDEX_SUB_2FIELD 0x01
188
typedef struct _avimetaindex
198
DWORD adwIndex[ANYSIZE_ARRAY];
201
#define ckidAVISUPERINDEX FCC('i','n','d','x')
202
typedef struct _avisuperindex {
211
struct _avisuperindex_entry {
215
} aIndex[ANYSIZE_ARRAY];
218
#define AVISTDINDEX_DELTAFRAME (0x80000000)
219
#define AVISTDINDEX_SIZEMASK (~0x80000000)
221
typedef struct _avistdindex_entry {
226
typedef struct _avistdindex {
234
DWORDLONG qwBaseOffset;
236
AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
239
typedef struct _avitimedindex_entry {
243
} AVITIMEDINDEX_ENTRY;
245
typedef struct _avitimedindex {
253
DWORDLONG qwBaseOffset;
255
AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
256
/* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
259
typedef struct _avitimecodeindex {
268
TIMECODEDATA aIndex[ANYSIZE_ARRAY];
271
typedef struct _avitcdlindex_entryA {
277
} AVITCDLINDEX_ENTRYA;
279
typedef struct _avitcdlindex_entryW {
285
} AVITCDLINDEX_ENTRYW;
287
typedef struct _avitcdlindexA {
296
AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY];
297
/* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
300
typedef struct _avitcdlindexW {
309
AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY];
310
/* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
313
#define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY)
314
#define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX)
316
typedef struct _avifieldindex_chunk {
324
DWORDLONG qwBaseOffset;
326
struct _avifieldindex_entry {
329
DWORD dwOffsetField2;
330
} aIndex[ANYSIZE_ARRAY];
331
} AVIFIELDINDEX, * PAVIFIELDINDEX;