ReactOS 0.4.16-dev-258-g81860b4
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
25typedef struct _riffchunk
26{
30
31typedef struct _rifflist
32{
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')
54typedef struct _avimainheader
55{
70
71#define ckidODML FCC('o','d','m','l')
72#define ckidAVIEXTHEADER FCC('d','m','l','h')
73typedef struct _aviextheader
74{
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
98typedef struct _avistreamheader
99{
115 struct
116 {
117 short int left;
118 short int top;
119 short int right;
120 short int bottom;
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
135typedef struct _avioldindex
136{
140 {
147
148typedef union _timecode
149{
150 struct
151 {
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
165typedef struct _timecodedata
166{
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
181typedef struct _avimetaindex
182{
193
194#define ckidAVISUPERINDEX FCC('i','n','d','x')
195typedef struct _avisuperindex {
210
211#define AVISTDINDEX_DELTAFRAME (0x80000000)
212#define AVISTDINDEX_SIZEMASK (~0x80000000)
213
214typedef struct _avistdindex_entry {
218
219typedef struct _avistdindex {
231
232typedef struct _avitimedindex_entry {
237
238typedef struct _avitimedindex {
249 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
251
252typedef struct _avitimecodeindex {
263
264typedef struct _avitcdlindex_entryA {
271
272typedef struct _avitcdlindex_entryW {
279
280typedef struct _avitcdlindexA {
290 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
292
293typedef struct _avitcdlindexW {
303 /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */
305
306#define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY)
307#define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX)
308
309typedef struct _avifieldindex_chunk {
325
326#include <poppack.h>
struct _avioldindex AVIOLDINDEX
struct _avimetaindex AVIMETAINDEX
struct _avitcdlindex_entryW AVITCDLINDEX_ENTRYW
struct _avitcdlindexW AVITCDLINDEXW
struct _riffchunk * LPRIFFCHUNK
union _timecode TIMECODE
struct _avistdindex AVISTDINDEX
struct _aviextheader AVIEXTHEADER
struct _avitcdlindex_entryA AVITCDLINDEX_ENTRYA
struct _avitimedindex_entry AVITIMEDINDEX_ENTRY
struct _avitcdlindexA AVITCDLINDEXA
struct _rifflist RIFFLIST
struct _avifieldindex_chunk * PAVIFIELDINDEX
struct _avisuperindex AVISUPERINDEX
struct _timecodedata TIMECODEDATA
struct _rifflist * LPRIFFLIST
struct _avitimedindex AVITIMEDINDEX
struct _avistdindex_entry AVISTDINDEX_ENTRY
struct _avitimecodeindex AVITIMECODEINDEX
struct _avimainheader AVIMAINHEADER
struct _avistreamheader AVISTREAMHEADER
struct _riffchunk RIFFCHUNK
struct _avifieldindex_chunk AVIFIELDINDEX
DWORD FOURCC
Definition: dmdls.h:25
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long long DWORDLONG
Definition: intsafe.h:93
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
FOURCC fcc
Definition: aviriff.h:75
DWORD dwGrandFrames
Definition: aviriff.h:77
DWORD dwFuture[61]
Definition: aviriff.h:78
DWORD cb
Definition: aviriff.h:76
Definition: aviriff.h:319
DWORD dwOffset
Definition: aviriff.h:320
DWORD dwOffsetField2
Definition: aviriff.h:322
DWORD dwSize
Definition: aviriff.h:321
DWORDLONG qwBaseOffset
Definition: aviriff.h:317
struct _avifieldindex_chunk::_avifieldindex_entry aIndex[ANYSIZE_ARRAY]
DWORD dwWidth
Definition: aviriff.h:66
DWORD dwHeight
Definition: aviriff.h:67
DWORD cb
Definition: aviriff.h:57
DWORD dwMicroSecPerFrame
Definition: aviriff.h:58
DWORD dwSuggestedBufferSize
Definition: aviriff.h:65
DWORD dwInitialFrames
Definition: aviriff.h:63
DWORD dwFlags
Definition: aviriff.h:61
FOURCC fcc
Definition: aviriff.h:56
DWORD dwStreams
Definition: aviriff.h:64
DWORD dwMaxBytesPerSec
Definition: aviriff.h:59
DWORD dwPaddingGranularity
Definition: aviriff.h:60
DWORD dwTotalFrames
Definition: aviriff.h:62
DWORD nEntriesInUse
Definition: aviriff.h:188
DWORD adwIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:191
WORD wLongsPerEntry
Definition: aviriff.h:185
BYTE bIndexSubType
Definition: aviriff.h:186
BYTE bIndexType
Definition: aviriff.h:187
DWORD dwChunkId
Definition: aviriff.h:189
FOURCC fcc
Definition: aviriff.h:183
Definition: aviriff.h:140
DWORD dwSize
Definition: aviriff.h:144
DWORD dwOffset
Definition: aviriff.h:143
DWORD dwChunkId
Definition: aviriff.h:141
DWORD dwFlags
Definition: aviriff.h:142
struct _avioldindex::_avioldindex_entry aIndex[ANYSIZE_ARRAY]
FOURCC fcc
Definition: aviriff.h:137
DWORD cb
Definition: aviriff.h:138
Definition: aviriff.h:214
DWORD dwSize
Definition: aviriff.h:216
DWORD dwOffset
Definition: aviriff.h:215
DWORD nEntriesInUse
Definition: aviriff.h:225
BYTE bIndexType
Definition: aviriff.h:224
DWORD dwChunkId
Definition: aviriff.h:226
DWORD dwReserved_3
Definition: aviriff.h:228
FOURCC fcc
Definition: aviriff.h:220
BYTE bIndexSubType
Definition: aviriff.h:223
AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:229
WORD wLongsPerEntry
Definition: aviriff.h:222
DWORDLONG qwBaseOffset
Definition: aviriff.h:227
short int top
Definition: aviriff.h:118
DWORD dwSampleSize
Definition: aviriff.h:114
DWORD dwInitialFrames
Definition: aviriff.h:107
struct _avistreamheader::@2267 rcFrame
FOURCC fccHandler
Definition: aviriff.h:103
FOURCC fccType
Definition: aviriff.h:102
DWORD dwSuggestedBufferSize
Definition: aviriff.h:112
DWORD dwQuality
Definition: aviriff.h:113
short int right
Definition: aviriff.h:119
short int bottom
Definition: aviriff.h:120
short int left
Definition: aviriff.h:117
DWORD dwLength
Definition: aviriff.h:111
Definition: aviriff.h:204
DWORD dwDuration
Definition: aviriff.h:207
DWORD dwSize
Definition: aviriff.h:206
DWORDLONG qwOffset
Definition: aviriff.h:205
BYTE bIndexSubType
Definition: aviriff.h:199
WORD wLongsPerEntry
Definition: aviriff.h:198
struct _avisuperindex::_avisuperindex_entry aIndex[ANYSIZE_ARRAY]
DWORD nEntriesInUse
Definition: aviriff.h:201
BYTE bIndexType
Definition: aviriff.h:200
DWORD dwChunkId
Definition: aviriff.h:202
FOURCC fcc
Definition: aviriff.h:196
DWORD nEntriesInUse
Definition: aviriff.h:286
WORD wLongsPerEntry
Definition: aviriff.h:283
FOURCC fcc
Definition: aviriff.h:281
BYTE bIndexSubType
Definition: aviriff.h:284
DWORD dwChunkId
Definition: aviriff.h:287
AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:289
BYTE bIndexType
Definition: aviriff.h:285
DWORD nEntriesInUse
Definition: aviriff.h:299
FOURCC fcc
Definition: aviriff.h:294
BYTE bIndexType
Definition: aviriff.h:298
BYTE bIndexSubType
Definition: aviriff.h:297
WORD wLongsPerEntry
Definition: aviriff.h:296
DWORD dwChunkId
Definition: aviriff.h:300
AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:302
CHAR szReelId[12]
Definition: aviriff.h:269
WCHAR szReelId[12]
Definition: aviriff.h:277
DWORD nEntriesInUse
Definition: aviriff.h:258
WORD wLongsPerEntry
Definition: aviriff.h:255
TIMECODEDATA aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:261
BYTE bIndexSubType
Definition: aviriff.h:256
Definition: aviriff.h:232
DWORD dwSize
Definition: aviriff.h:234
DWORD dwOffset
Definition: aviriff.h:233
DWORD dwDuration
Definition: aviriff.h:235
DWORD dwChunkId
Definition: aviriff.h:245
DWORD dwReserved_3
Definition: aviriff.h:247
WORD wLongsPerEntry
Definition: aviriff.h:241
BYTE bIndexType
Definition: aviriff.h:243
BYTE bIndexSubType
Definition: aviriff.h:242
FOURCC fcc
Definition: aviriff.h:239
DWORDLONG qwBaseOffset
Definition: aviriff.h:246
AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:248
DWORD nEntriesInUse
Definition: aviriff.h:244
FOURCC fcc
Definition: aviriff.h:27
DWORD cb
Definition: aviriff.h:28
FOURCC fcc
Definition: aviriff.h:33
DWORD cb
Definition: aviriff.h:34
FOURCC fccListType
Definition: aviriff.h:35
DWORD dwSMPTEflags
Definition: aviriff.h:168
TIMECODE time
Definition: aviriff.h:167
DWORD dwUser
Definition: aviriff.h:169
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
LONG cFrames
Definition: aviriff.h:154
DWORDLONG qw
Definition: aviriff.h:156
WORD wFrameRate
Definition: aviriff.h:152
WORD wFrameFract
Definition: aviriff.h:153
struct _timecode::@2268 DUMMYSTRUCTNAME
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193