ReactOS  0.4.14-dev-606-g14ebc0b
aviriff.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003 Robert Shearman
3  * Copyright (C) 2008 Maarten Lankhorst
4  *
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.
9  *
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.
14  *
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
18  */
19 
20 #pragma once
21 
22 /* All definitions here are packed structures of on-disk formats */
23 #include <pshpack2.h>
24 
25 typedef struct _riffchunk
26 {
30 
31 typedef struct _rifflist
32 {
36 } RIFFLIST, * LPRIFFLIST;
37 
38 #define FCC( ch0, ch1, ch2, ch3 ) \
39  ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
40  ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
41 
42 #define RIFFROUND(cb) ((cb) + ((cb)&1))
43 #define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk)+sizeof(RIFFCHUNK)+RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
44 
45 /* flags for dwFlags member of AVIMAINHEADER */
46 #define AVIF_HASINDEX 0x00000010
47 #define AVIF_MUSTUSEINDEX 0x00000020
48 #define AVIF_ISINTERLEAVED 0x00000100
49 #define AVIF_TRUSTCKTYPE 0x00000800
50 #define AVIF_WASCAPTUREFILE 0x00010000
51 #define AVIF_COPYRIGHTED 0x00020000
52 
53 #define ckidMAINAVIHEADER FCC('a','v','i','h')
54 typedef struct _avimainheader
55 {
70 
71 #define ckidODML FCC('o','d','m','l')
72 #define ckidAVIEXTHEADER FCC('d','m','l','h')
73 typedef struct _aviextheader
74 {
79 } AVIEXTHEADER;
80 
81 #define ckidSTREAMLIST FCC('s','t','r','l')
82 
83 /* flags for dwFlags member of AVISTREAMHEADER */
84 #define AVISF_DISABLED 0x00000001
85 #define AVISF_VIDEO_PALCHANGES 0x00010000
86 
87 #ifndef ckidSTREAMHEADER
88 #define ckidSTREAMHEADER FCC('s','t','r','h')
89 #endif
90 
91 #ifndef streamtypeVIDEO
92 #define streamtypeVIDEO FCC('v','i','d','s')
93 #define streamtypeAUDIO FCC('a','u','d','s')
94 #define streamtypeMIDI FCC('m','i','d','s')
95 #define streamtypeTEXT FCC('t','x','t','s')
96 #endif
97 
98 typedef struct _avistreamheader
99 {
115  struct
116  {
117  short int left;
118  short int top;
119  short int right;
120  short int bottom;
121  } rcFrame;
123 
124 #ifndef ckidSTREAMFORMAT
125 #define ckidSTREAMFORMAT FCC('s','t','r','f')
126 #endif
127 #define ckidAVIOLDINDEX FCC('i','d','x','1')
128 
129 /* flags for dwFlags member of _avioldindex_entry */
130 #define AVIIF_LIST 0x00000001
131 #define AVIIF_KEYFRAME 0x00000010
132 #define AVIIF_NO_TIME 0x00000100
133 #define AVIIF_COMPRESSOR 0x0FFF0000
134 
135 typedef struct _avioldindex
136 {
140  {
146 } AVIOLDINDEX;
147 
148 typedef union _timecode
149 {
150  struct
151  {
155  } DUMMYSTRUCTNAME;
157 } TIMECODE;
158 
159 #define TIMECODE_RATE_30DROP 0
160 
161 /* flags for dwSMPTEflags member of TIMECODEDATA */
162 #define TIMECODE_SMPTE_BINARY_GROUP 0x07
163 #define TIMECODE_SMPTE_COLOR_FRAME 0x08
164 
165 typedef struct _timecodedata
166 {
170 } TIMECODEDATA;
171 
172 #define AVI_INDEX_OF_INDEXES 0x00
173 #define AVI_INDEX_OF_CHUNKS 0x01
174 #define AVI_INDEX_OF_TIMED_CHUNKS 0x02
175 #define AVI_INDEX_OF_SUB_2FIELD 0x03
176 #define AVI_INDEX_IS_DATA 0x80
177 
178 #define AVI_INDEX_SUB_DEFAULT 0x00
179 #define AVI_INDEX_SUB_2FIELD 0x01
180 
181 typedef struct _avimetaindex
182 {
192 } AVIMETAINDEX;
193 
194 #define ckidAVISUPERINDEX FCC('i','n','d','x')
195 typedef struct _avisuperindex {
209 } AVISUPERINDEX;
210 
211 #define AVISTDINDEX_DELTAFRAME (0x80000000)
212 #define AVISTDINDEX_SIZEMASK (~0x80000000)
213 
214 typedef struct _avistdindex_entry {
218 
219 typedef struct _avistdindex {
230 } AVISTDINDEX;
231 
232 typedef struct _avitimedindex_entry {
237 
238 typedef struct _avitimedindex {
249  /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
250 } AVITIMEDINDEX;
251 
252 typedef struct _avitimecodeindex {
263 
264 typedef struct _avitcdlindex_entryA {
271 
272 typedef struct _avitcdlindex_entryW {
279 
280 typedef struct _avitcdlindexA {
290  /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
291 } AVITCDLINDEXA;
292 
293 typedef struct _avitcdlindexW {
303  /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
304 } AVITCDLINDEXW;
305 
306 #define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY)
307 #define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX)
308 
309 typedef struct _avifieldindex_chunk {
325 
326 #include <poppack.h>
DWORD dwUser
Definition: aviriff.h:169
BYTE bIndexSubType
Definition: aviriff.h:242
DWORD dwWidth
Definition: aviriff.h:66
DWORD cb
Definition: aviriff.h:57
FOURCC fcc
Definition: aviriff.h:196
struct _avitimedindex AVITIMEDINDEX
Definition: aviriff.h:214
struct _timecodedata TIMECODEDATA
WORD wLongsPerEntry
Definition: aviriff.h:296
short int top
Definition: aviriff.h:118
struct _avistdindex AVISTDINDEX
TIMECODE time
Definition: aviriff.h:167
AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:302
struct _avifieldindex_chunk * PAVIFIELDINDEX
FOURCC fcc
Definition: aviriff.h:137
DWORD dwMaxBytesPerSec
Definition: aviriff.h:59
short int bottom
Definition: aviriff.h:120
DWORD dwChunkId
Definition: aviriff.h:189
#define ANYSIZE_ARRAY
Definition: typedefs.h:45
DWORD nEntriesInUse
Definition: aviriff.h:299
DWORD dwInitialFrames
Definition: aviriff.h:107
char CHAR
Definition: xmlstorage.h:175
short int left
Definition: aviriff.h:117
WORD wLongsPerEntry
Definition: aviriff.h:222
struct _avistreamheader::@2185 rcFrame
DWORD dwSuggestedBufferSize
Definition: aviriff.h:65
BYTE bIndexType
Definition: aviriff.h:243
struct _avitcdlindex_entryA AVITCDLINDEX_ENTRYA
DWORD dwQuality
Definition: aviriff.h:113
DWORD dwPaddingGranularity
Definition: aviriff.h:60
BYTE bIndexSubType
Definition: aviriff.h:284
DWORD dwTotalFrames
Definition: aviriff.h:62
DWORD dwSuggestedBufferSize
Definition: aviriff.h:112
Definition: aviriff.h:204
WORD wLongsPerEntry
Definition: aviriff.h:241
struct _avifieldindex_chunk AVIFIELDINDEX
struct _avioldindex AVIOLDINDEX
DWORD dwFlags
Definition: aviriff.h:61
WORD wLongsPerEntry
Definition: aviriff.h:283
WORD wFrameFract
Definition: aviriff.h:153
struct _avimainheader AVIMAINHEADER
DWORD dwSMPTEflags
Definition: aviriff.h:168
struct _riffchunk * LPRIFFCHUNK
DWORDLONG qw
Definition: aviriff.h:156
DWORD dwChunkId
Definition: aviriff.h:226
FOURCC fcc
Definition: aviriff.h:281
struct _avioldindex::_avioldindex_entry aIndex[ANYSIZE_ARRAY]
DWORD dwChunkId
Definition: aviriff.h:141
struct _avitimecodeindex AVITIMECODEINDEX
DWORD dwSize
Definition: aviriff.h:216
CHAR szReelId[12]
Definition: aviriff.h:269
WORD wFrameRate
Definition: aviriff.h:152
FOURCC fcc
Definition: aviriff.h:27
struct _aviextheader AVIEXTHEADER
FOURCC fcc
Definition: aviriff.h:33
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
long LONG
Definition: pedump.c:60
BYTE bIndexType
Definition: aviriff.h:200
DWORD dwOffset
Definition: aviriff.h:143
struct _avitcdlindex_entryW AVITCDLINDEX_ENTRYW
struct _avistreamheader AVISTREAMHEADER
struct _avimetaindex AVIMETAINDEX
DWORD dwReserved_3
Definition: aviriff.h:228
DWORD cb
Definition: aviriff.h:28
DWORD nEntriesInUse
Definition: aviriff.h:225
AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:248
BYTE bIndexSubType
Definition: aviriff.h:186
struct _avitimedindex_entry AVITIMEDINDEX_ENTRY
DWORD cb
Definition: aviriff.h:138
DWORDLONG qwOffset
Definition: aviriff.h:205
FOURCC fccType
Definition: aviriff.h:102
Definition: aviriff.h:232
DWORD dwLength
Definition: aviriff.h:111
BYTE bIndexType
Definition: aviriff.h:224
DWORD adwIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:191
FOURCC fcc
Definition: aviriff.h:56
WORD wLongsPerEntry
Definition: aviriff.h:255
struct _rifflist RIFFLIST
DWORD dwInitialFrames
Definition: aviriff.h:63
DWORD dwSize
Definition: aviriff.h:321
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORDLONG qwBaseOffset
Definition: aviriff.h:317
struct _avisuperindex AVISUPERINDEX
DWORD nEntriesInUse
Definition: aviriff.h:188
BYTE bIndexSubType
Definition: aviriff.h:223
DWORD dwFlags
Definition: aviriff.h:142
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
WORD wLongsPerEntry
Definition: aviriff.h:198
struct _rifflist * LPRIFFLIST
FOURCC fcc
Definition: aviriff.h:183
BYTE bIndexSubType
Definition: aviriff.h:256
DWORD dwOffset
Definition: aviriff.h:320
struct _riffchunk RIFFCHUNK
FOURCC fccListType
Definition: aviriff.h:35
FOURCC fccHandler
Definition: aviriff.h:103
WCHAR szReelId[12]
Definition: aviriff.h:277
LONG cFrames
Definition: aviriff.h:154
DWORD dwSampleSize
Definition: aviriff.h:114
DWORD dwSize
Definition: aviriff.h:206
BYTE bIndexSubType
Definition: aviriff.h:297
DWORDLONG qwBaseOffset
Definition: aviriff.h:246
DWORD dwChunkId
Definition: aviriff.h:245
unsigned char BYTE
Definition: mem.h:68
DWORD cb
Definition: aviriff.h:34
AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:229
FOURCC fcc
Definition: aviriff.h:75
BYTE bIndexType
Definition: aviriff.h:187
BYTE bIndexSubType
Definition: aviriff.h:199
DWORD nEntriesInUse
Definition: aviriff.h:244
DWORD FOURCC
Definition: dmdls.h:25
DWORD nEntriesInUse
Definition: aviriff.h:286
struct _avitcdlindexW AVITCDLINDEXW
DWORD dwReserved_3
Definition: aviriff.h:247
DWORD dwOffsetField2
Definition: aviriff.h:322
FOURCC fcc
Definition: aviriff.h:220
DWORD dwChunkId
Definition: aviriff.h:202
short int right
Definition: aviriff.h:119
union _timecode TIMECODE
BYTE bIndexType
Definition: aviriff.h:298
DWORD dwMicroSecPerFrame
Definition: aviriff.h:58
BYTE bIndexType
Definition: aviriff.h:285
DWORD dwDuration
Definition: aviriff.h:235
DWORD cb
Definition: aviriff.h:76
struct _avifieldindex_chunk::_avifieldindex_entry aIndex[ANYSIZE_ARRAY]
unsigned int UINT
Definition: ndis.h:50
DWORD dwChunkId
Definition: aviriff.h:287
DWORD dwOffset
Definition: aviriff.h:215
DWORD dwSize
Definition: aviriff.h:234
DWORD dwStreams
Definition: aviriff.h:64
DWORD dwFuture[61]
Definition: aviriff.h:78
WORD wLongsPerEntry
Definition: aviriff.h:185
struct _timecode::@2186 DUMMYSTRUCTNAME
TIMECODEDATA aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:261
DWORDLONG qwBaseOffset
Definition: aviriff.h:227
struct _avisuperindex::_avisuperindex_entry aIndex[ANYSIZE_ARRAY]
unsigned long long DWORDLONG
Definition: intsafe.h:99
DWORD dwChunkId
Definition: aviriff.h:300
struct _avistdindex_entry AVISTDINDEX_ENTRY
Definition: aviriff.h:319
DWORD nEntriesInUse
Definition: aviriff.h:201
Definition: aviriff.h:139
DWORD dwHeight
Definition: aviriff.h:67
DWORD dwDuration
Definition: aviriff.h:207
AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:289
DWORD dwSize
Definition: aviriff.h:144
DWORD dwOffset
Definition: aviriff.h:233
FOURCC fcc
Definition: aviriff.h:294
DWORD nEntriesInUse
Definition: aviriff.h:258
DWORD dwGrandFrames
Definition: aviriff.h:77
FOURCC fcc
Definition: aviriff.h:239
struct _avitcdlindexA AVITCDLINDEXA