source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/aviriff.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 6.2 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#include <winapifamily.h>
7
8#ifndef AVIRIFF_H
9#define AVIRIFF_H
10
11#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
12
13#ifndef NUMELMS
14#define NUMELMS (aa) (sizeof (aa) / sizeof ((aa)[0]))
15#endif
16
17#define FCC(ch4) ((((DWORD)(ch4) & 0xff) << 24) | (((DWORD)(ch4) & 0xff00) << 8) | (((DWORD)(ch4) & 0xff0000) >> 8) | (((DWORD)(ch4) & 0xff000000) >> 24))
18
19#include <pshpack2.h>
20typedef struct _riffchunk {
21 FOURCC fcc;
22 DWORD cb;
23} RIFFCHUNK,*LPRIFFCHUNK;
24
25typedef struct _rifflist {
26 FOURCC fcc;
27 DWORD cb;
28 FOURCC fccListType;
29} RIFFLIST,*LPRIFFLIST;
30
31#define RIFFROUND(cb) ((cb) + ((cb) & 1))
32#define RIFFNEXT(pChunk) (LPRIFFCHUNK) ((LPBYTE) (pChunk) + sizeof (RIFFCHUNK) + RIFFROUND (((LPRIFFCHUNK)pChunk)->cb))
33
34#define ckidMAINAVIHEADER FCC('avih')
35#define ckidAVIEXTHEADER FCC('dmlh')
36#define ckidAVIOLDINDEX FCC('idx1')
37#define ckidAVISUPERINDEX FCC('indx')
38#define ckidODML FCC('odml')
39
40#ifndef ckidSTREAMFORMAT
41#define ckidSTREAMFORMAT FCC('strf')
42#endif
43#ifndef ckidSTREAMHEADER
44#define ckidSTREAMHEADER FCC('strh')
45#endif
46
47#define ckidSTREAMLIST FCC('strl')
48
49#ifndef streamtypeVIDEO
50#define streamtypeAUDIO FCC('auds')
51#define streamtypeMIDI FCC('mids')
52#define streamtypeTEXT FCC('txts')
53#define streamtypeVIDEO FCC('vids')
54#endif
55
56#define AVIF_HASINDEX 0x00000010
57#define AVIF_MUSTUSEINDEX 0x00000020
58#define AVIF_ISINTERLEAVED 0x00000100
59#define AVIF_TRUSTCKTYPE 0x00000800
60#define AVIF_WASCAPTUREFILE 0x00010000
61#define AVIF_COPYRIGHTED 0x00020000
62
63#ifndef AVIIF_LIST
64#define AVIIF_LIST 0x1
65#define AVIIF_KEYFRAME 0x10
66#endif
67#define AVIIF_NO_TIME 0x100
68#define AVIIF_COMPRESSOR 0xfff0000
69
70#define AVISF_DISABLED 0x00000001
71#define AVISF_VIDEO_PALCHANGES 0x00010000
72
73#define TIMECODE_RATE_30DROP 0
74
75#define TIMECODE_SMPTE_BINARY_GROUP 0x7
76#define TIMECODE_SMPTE_COLOR_FRAME 0x8
77
78#define AVI_INDEX_OF_INDEXES 0x0
79#define AVI_INDEX_OF_CHUNKS 0x1
80#define AVI_INDEX_OF_TIMED_CHUNKS 0x2
81#define AVI_INDEX_OF_SUB_2FIELD 0x3
82#define AVI_INDEX_IS_DATA 0x80
83
84#define AVI_INDEX_SUB_DEFAULT 0x0
85#define AVI_INDEX_SUB_2FIELD 0x1
86
87#define STDINDEXSIZE 0x4000
88#define NUMINDEX(wLongsPerEntry) ((STDINDEXSIZE - 32) / 4 / (wLongsPerEntry))
89#define NUMINDEXFILL(wLongsPerEntry) ((STDINDEXSIZE / 4) - NUMINDEX (wLongsPerEntry))
90
91#define Valid_SUPERINDEX(pi) (*(DWORD *) (&((pi)->wLongsPerEntry)) == 4)
92
93typedef struct _avimainheader {
94 FOURCC fcc;
95 DWORD cb;
96 DWORD dwMicroSecPerFrame;
97 DWORD dwMaxBytesPerSec;
98 DWORD dwPaddingGranularity;
99 DWORD dwFlags;
100 DWORD dwTotalFrames;
101 DWORD dwInitialFrames;
102 DWORD dwStreams;
103 DWORD dwSuggestedBufferSize;
104 DWORD dwWidth;
105 DWORD dwHeight;
106 DWORD dwReserved[4];
107} AVIMAINHEADER;
108
109typedef struct _aviextheader {
110 FOURCC fcc;
111 DWORD cb;
112 DWORD dwGrandFrames;
113 DWORD dwFuture[61];
114} AVIEXTHEADER;
115
116typedef struct _avistreamheader {
117 FOURCC fcc;
118 DWORD cb;
119 FOURCC fccType;
120 FOURCC fccHandler;
121 DWORD dwFlags;
122 WORD wPriority;
123 WORD wLanguage;
124 DWORD dwInitialFrames;
125 DWORD dwScale;
126 DWORD dwRate;
127 DWORD dwStart;
128 DWORD dwLength;
129 DWORD dwSuggestedBufferSize;
130 DWORD dwQuality;
131 DWORD dwSampleSize;
132 struct {
133 short int left;
134 short int top;
135 short int right;
136 short int bottom;
137 } rcFrame;
138} AVISTREAMHEADER;
139
140typedef struct _avioldindex {
141 FOURCC fcc;
142 DWORD cb;
143 struct _avioldindex_entry {
144 DWORD dwChunkId;
145 DWORD dwFlags;
146 DWORD dwOffset;
147 DWORD dwSize;
148 } aIndex[];
149} AVIOLDINDEX;
150
151#ifndef TIMECODE_DEFINED
152#define TIMECODE_DEFINED
153typedef union _timecode {
154 __C89_NAMELESS struct {
155 WORD wFrameRate;
156 WORD wFrameFract;
157 LONG cFrames;
158 };
159 DWORDLONG qw;
160} TIMECODE;
161#endif
162
163typedef struct _timecodedata {
164 TIMECODE time;
165 DWORD dwSMPTEflags;
166 DWORD dwUser;
167} TIMECODEDATA;
168
169typedef struct _avimetaindex {
170 FOURCC fcc;
171 UINT cb;
172 WORD wLongsPerEntry;
173 BYTE bIndexSubType;
174 BYTE bIndexType;
175 DWORD nEntriesInUse;
176 DWORD dwChunkId;
177 DWORD dwReserved[3];
178 DWORD adwIndex[];
179} AVIMETAINDEX;
180
181typedef struct _avisuperindex {
182 FOURCC fcc;
183 UINT cb;
184 WORD wLongsPerEntry;
185 BYTE bIndexSubType;
186 BYTE bIndexType;
187 DWORD nEntriesInUse;
188 DWORD dwChunkId;
189 DWORD dwReserved[3];
190 struct _avisuperindex_entry {
191 DWORDLONG qwOffset;
192 DWORD dwSize;
193 DWORD dwDuration;
194 } aIndex[NUMINDEX (4)];
195} AVISUPERINDEX;
196
197typedef struct _avistdindex_entry {
198 DWORD dwOffset;
199 DWORD dwSize;
200} AVISTDINDEX_ENTRY;
201
202#define AVISTDINDEX_DELTAFRAME (0x80000000)
203#define AVISTDINDEX_SIZEMASK (~0x80000000)
204
205typedef struct _avistdindex {
206 FOURCC fcc;
207 UINT cb;
208 WORD wLongsPerEntry;
209 BYTE bIndexSubType;
210 BYTE bIndexType;
211 DWORD nEntriesInUse;
212 DWORD dwChunkId;
213 DWORDLONG qwBaseOffset;
214 DWORD dwReserved_3;
215 AVISTDINDEX_ENTRY aIndex[NUMINDEX (2)];
216} AVISTDINDEX;
217
218typedef struct _avitimedindex_entry {
219 DWORD dwOffset;
220 DWORD dwSize;
221 DWORD dwDuration;
222} AVITIMEDINDEX_ENTRY;
223
224typedef struct _avitimedindex {
225 FOURCC fcc;
226 UINT cb;
227 WORD wLongsPerEntry;
228 BYTE bIndexSubType;
229 BYTE bIndexType;
230 DWORD nEntriesInUse;
231 DWORD dwChunkId;
232 DWORDLONG qwBaseOffset;
233 DWORD dwReserved_3;
234 AVITIMEDINDEX_ENTRY aIndex[NUMINDEX (3)];
235 DWORD adwTrailingFill[NUMINDEXFILL (3)];
236} AVITIMEDINDEX;
237
238typedef struct _avitimecodeindex {
239 FOURCC fcc;
240 UINT cb;
241 WORD wLongsPerEntry;
242 BYTE bIndexSubType;
243 BYTE bIndexType;
244 DWORD nEntriesInUse;
245 DWORD dwChunkId;
246 DWORD dwReserved[3];
247 TIMECODEDATA aIndex[NUMINDEX (sizeof (TIMECODEDATA)/sizeof (LONG))];
248} AVITIMECODEINDEX;
249
250typedef struct _avitcdlindex_entry {
251 DWORD dwTick;
252 TIMECODE time;
253 DWORD dwSMPTEflags;
254 DWORD dwUser;
255 TCHAR szReelId[12];
256} AVITCDLINDEX_ENTRY;
257
258typedef struct _avitcdlindex {
259 FOURCC fcc;
260 UINT cb;
261 WORD wLongsPerEntry;
262 BYTE bIndexSubType;
263 BYTE bIndexType;
264 DWORD nEntriesInUse;
265 DWORD dwChunkId;
266 DWORD dwReserved[3];
267 AVITCDLINDEX_ENTRY aIndex[NUMINDEX (7)];
268 DWORD adwTrailingFill[NUMINDEXFILL (7)];
269} AVITCDLINDEX;
270
271typedef struct _avifieldindex_chunk {
272 FOURCC fcc;
273 DWORD cb;
274 WORD wLongsPerEntry;
275 BYTE bIndexSubType;
276 BYTE bIndexType;
277 DWORD nEntriesInUse;
278 DWORD dwChunkId;
279 DWORDLONG qwBaseOffset;
280 DWORD dwReserved3;
281 struct _avifieldindex_entry {
282 DWORD dwOffset;
283 DWORD dwSize;
284 DWORD dwOffsetField2;
285 } aIndex[];
286} AVIFIELDINDEX,*PAVIFIELDINDEX;
287#include <poppack.h>
288
289#endif
290
291#endif
Note: See TracBrowser for help on using the repository browser.