po: Update Lithuanian translation.
[wine.git] / include / aviriff.h
blob9fea63a6f0e96c551d3c608036fd0f6984717afb
1 /*
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 #ifndef AVIRIFF_H
21 #define AVIRIFF_H
23 /* All definitions here are packed structures of on-disk formats */
24 #include <pshpack2.h>
26 typedef struct _riffchunk
28 FOURCC fcc;
29 DWORD cb;
30 } RIFFCHUNK, * LPRIFFCHUNK;
32 typedef struct _rifflist
34 FOURCC fcc;
35 DWORD cb;
36 FOURCC fccListType;
37 } RIFFLIST, * LPRIFFLIST;
39 #define FCC( ch0, ch1, ch2, ch3 ) \
40 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
41 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
43 #define RIFFROUND(cb) ((cb) + ((cb)&1))
44 #define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk)+sizeof(RIFFCHUNK)+RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
46 /* flags for dwFlags member of AVIMAINHEADER */
47 #define AVIF_HASINDEX 0x00000010
48 #define AVIF_MUSTUSEINDEX 0x00000020
49 #define AVIF_ISINTERLEAVED 0x00000100
50 #define AVIF_TRUSTCKTYPE 0x00000800
51 #define AVIF_WASCAPTUREFILE 0x00010000
52 #define AVIF_COPYRIGHTED 0x00020000
54 #define ckidMAINAVIHEADER FCC('a','v','i','h')
55 typedef struct _avimainheader
57 FOURCC fcc;
58 DWORD cb;
59 DWORD dwMicroSecPerFrame;
60 DWORD dwMaxBytesPerSec;
61 DWORD dwPaddingGranularity;
62 DWORD dwFlags;
63 DWORD dwTotalFrames;
64 DWORD dwInitialFrames;
65 DWORD dwStreams;
66 DWORD dwSuggestedBufferSize;
67 DWORD dwWidth;
68 DWORD dwHeight;
69 DWORD dwReserved[4];
70 } AVIMAINHEADER;
72 #define ckidODML FCC('o','d','m','l')
73 #define ckidAVIEXTHEADER FCC('d','m','l','h')
74 typedef struct _aviextheader
76 FOURCC fcc;
77 DWORD cb;
78 DWORD dwGrandFrames;
79 DWORD dwFuture[61];
80 } AVIEXTHEADER;
82 #define ckidSTREAMLIST FCC('s','t','r','l')
84 /* flags for dwFlags member of AVISTREAMHEADER */
85 #define AVISF_DISABLED 0x00000001
86 #define AVISF_VIDEO_PALCHANGES 0x00010000
88 #ifndef ckidSTREAMHEADER
89 #define ckidSTREAMHEADER FCC('s','t','r','h')
90 #endif
92 #ifndef streamtypeVIDEO
93 #define streamtypeVIDEO FCC('v','i','d','s')
94 #define streamtypeAUDIO FCC('a','u','d','s')
95 #define streamtypeMIDI FCC('m','i','d','s')
96 #define streamtypeTEXT FCC('t','x','t','s')
97 #endif
99 typedef struct _avistreamheader
101 FOURCC fcc;
102 DWORD cb;
103 FOURCC fccType;
104 FOURCC fccHandler;
105 DWORD dwFlags;
106 WORD wPriority;
107 WORD wLanguage;
108 DWORD dwInitialFrames;
109 DWORD dwScale;
110 DWORD dwRate;
111 DWORD dwStart;
112 DWORD dwLength;
113 DWORD dwSuggestedBufferSize;
114 DWORD dwQuality;
115 DWORD dwSampleSize;
116 struct
118 short int left;
119 short int top;
120 short int right;
121 short int bottom;
122 } rcFrame;
123 } AVISTREAMHEADER;
125 #ifndef ckidSTREAMFORMAT
126 #define ckidSTREAMFORMAT FCC('s','t','r','f')
127 #endif
128 #define ckidAVIOLDINDEX FCC('i','d','x','1')
130 /* flags for dwFlags member of _avioldindex_entry */
131 #define AVIIF_LIST 0x00000001
132 #define AVIIF_KEYFRAME 0x00000010
133 #define AVIIF_NO_TIME 0x00000100
134 #define AVIIF_COMPRESSOR 0x0FFF0000
136 typedef struct _avioldindex
138 FOURCC fcc;
139 DWORD cb;
140 struct _avioldindex_entry
142 DWORD dwChunkId;
143 DWORD dwFlags;
144 DWORD dwOffset;
145 DWORD dwSize;
146 } aIndex[ANYSIZE_ARRAY];
147 } AVIOLDINDEX;
149 typedef union _timecode
151 struct
153 WORD wFrameRate;
154 WORD wFrameFract;
155 LONG cFrames;
156 } DUMMYSTRUCTNAME;
157 DWORDLONG qw;
158 } TIMECODE;
160 #define TIMECODE_RATE_30DROP 0
162 /* flags for dwSMPTEflags member of TIMECODEDATA */
163 #define TIMECODE_SMPTE_BINARY_GROUP 0x07
164 #define TIMECODE_SMPTE_COLOR_FRAME 0x08
166 typedef struct _timecodedata
168 TIMECODE time;
169 DWORD dwSMPTEflags;
170 DWORD dwUser;
171 } TIMECODEDATA;
173 #define AVI_INDEX_OF_INDEXES 0x00
174 #define AVI_INDEX_OF_CHUNKS 0x01
175 #define AVI_INDEX_OF_TIMED_CHUNKS 0x02
176 #define AVI_INDEX_OF_SUB_2FIELD 0x03
177 #define AVI_INDEX_IS_DATA 0x80
179 #define AVI_INDEX_SUB_DEFAULT 0x00
180 #define AVI_INDEX_SUB_2FIELD 0x01
182 typedef struct _avimetaindex
184 FOURCC fcc;
185 UINT cb;
186 WORD wLongsPerEntry;
187 BYTE bIndexSubType;
188 BYTE bIndexType;
189 DWORD nEntriesInUse;
190 DWORD dwChunkId;
191 DWORD dwReserved[3];
192 DWORD adwIndex[ANYSIZE_ARRAY];
193 } AVIMETAINDEX;
195 #define ckidAVISUPERINDEX FCC('i','n','d','x')
196 typedef struct _avisuperindex {
197 FOURCC fcc;
198 UINT cb;
199 WORD wLongsPerEntry;
200 BYTE bIndexSubType;
201 BYTE bIndexType;
202 DWORD nEntriesInUse;
203 DWORD dwChunkId;
204 DWORD dwReserved[3];
205 struct _avisuperindex_entry {
206 DWORDLONG qwOffset;
207 DWORD dwSize;
208 DWORD dwDuration;
209 } aIndex[ANYSIZE_ARRAY];
210 } AVISUPERINDEX;
212 #define AVISTDINDEX_DELTAFRAME (0x80000000)
213 #define AVISTDINDEX_SIZEMASK (~0x80000000)
215 typedef struct _avistdindex_entry {
216 DWORD dwOffset;
217 DWORD dwSize;
218 } AVISTDINDEX_ENTRY;
220 typedef struct _avistdindex {
221 FOURCC fcc;
222 UINT cb;
223 WORD wLongsPerEntry;
224 BYTE bIndexSubType;
225 BYTE bIndexType;
226 DWORD nEntriesInUse;
227 DWORD dwChunkId;
228 DWORDLONG qwBaseOffset;
229 DWORD dwReserved_3;
230 AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
231 } AVISTDINDEX;
233 typedef struct _avitimedindex_entry {
234 DWORD dwOffset;
235 DWORD dwSize;
236 DWORD dwDuration;
237 } AVITIMEDINDEX_ENTRY;
239 typedef struct _avitimedindex {
240 FOURCC fcc;
241 UINT cb;
242 WORD wLongsPerEntry;
243 BYTE bIndexSubType;
244 BYTE bIndexType;
245 DWORD nEntriesInUse;
246 DWORD dwChunkId;
247 DWORDLONG qwBaseOffset;
248 DWORD dwReserved_3;
249 AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY];
250 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
251 } AVITIMEDINDEX;
253 typedef struct _avitimecodeindex {
254 FOURCC fcc;
255 UINT cb;
256 WORD wLongsPerEntry;
257 BYTE bIndexSubType;
258 BYTE bIndexType;
259 DWORD nEntriesInUse;
260 DWORD dwChunkId;
261 DWORD dwReserved[3];
262 TIMECODEDATA aIndex[ANYSIZE_ARRAY];
263 } AVITIMECODEINDEX;
265 typedef struct _avitcdlindex_entryA {
266 DWORD dwTick;
267 TIMECODE time;
268 DWORD dwSMPTEflags;
269 DWORD dwUser;
270 CHAR szReelId[12];
271 } AVITCDLINDEX_ENTRYA;
273 typedef struct _avitcdlindex_entryW {
274 DWORD dwTick;
275 TIMECODE time;
276 DWORD dwSMPTEflags;
277 DWORD dwUser;
278 WCHAR szReelId[12];
279 } AVITCDLINDEX_ENTRYW;
281 typedef struct _avitcdlindexA {
282 FOURCC fcc;
283 UINT cb;
284 WORD wLongsPerEntry;
285 BYTE bIndexSubType;
286 BYTE bIndexType;
287 DWORD nEntriesInUse;
288 DWORD dwChunkId;
289 DWORD dwReserved[3];
290 AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY];
291 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
292 } AVITCDLINDEXA;
294 typedef struct _avitcdlindexW {
295 FOURCC fcc;
296 UINT cb;
297 WORD wLongsPerEntry;
298 BYTE bIndexSubType;
299 BYTE bIndexType;
300 DWORD nEntriesInUse;
301 DWORD dwChunkId;
302 DWORD dwReserved[3];
303 AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY];
304 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
305 } AVITCDLINDEXW;
307 #define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY)
308 #define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX)
310 typedef struct _avifieldindex_chunk {
311 FOURCC fcc;
312 DWORD cb;
313 WORD wLongsPerEntry;
314 BYTE bIndexSubType;
315 BYTE bIndexType;
316 DWORD nEntriesInUse;
317 DWORD dwChunkId;
318 DWORDLONG qwBaseOffset;
319 DWORD dwReserved3;
320 struct _avifieldindex_entry {
321 DWORD dwOffset;
322 DWORD dwSize;
323 DWORD dwOffsetField2;
324 } aIndex[ANYSIZE_ARRAY];
325 } AVIFIELDINDEX, * PAVIFIELDINDEX;
327 #include <poppack.h>
329 #endif /* AVIRIFF_H */