ole32: Remove some assertions in the stuctured storage code by
[wine] / include / aviriff.h
1 /*
2  * Copyright (C) 2003 Robert Shearman
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 typedef struct _riffchunk
20 {
21     FOURCC fcc;
22     DWORD cb;
23 } RIFFCHUNK, * LPRIFFCHUNK;
24
25 typedef struct _rifflist
26 {
27     FOURCC fcc;
28     DWORD cb;
29     FOURCC fccListType;
30 } RIFFLIST, * LPRIFFLIST;
31
32 #define RIFFROUND(cb) ((cb) + ((cb)&1))
33 #define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk)+sizeof(RIFFCHUNK)+RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
34
35 /* flags for dwFlags member of AVIMAINHEADER */
36 #define AVIF_HASINDEX       0x00000010
37 #define AVIF_MUSTUSEINDEX   0x00000020
38 #define AVIF_ISINTERLEAVED  0x00000100
39 #define AVIF_TRUSTCKTYPE    0x00000800
40 #define AVIF_WASCAPTUREFILE 0x00010000
41 #define AVIF_COPYRIGHTED    0x00020000
42
43 typedef struct _avimainheader
44 {
45     FOURCC fcc;
46     DWORD cb;
47     DWORD dwMicroSecPerFrame;
48     DWORD dwMaxBytesPerSec;
49     DWORD dwPaddingGranularity;
50     DWORD dwFlags;
51     DWORD dwTotalFrames;
52     DWORD dwInitialFrames;
53     DWORD dwStreams;
54     DWORD dwSuggestedBufferSize;
55     DWORD dwWidth;
56     DWORD dwHeight;
57     DWORD dwReserved[4];
58 } AVIMAINHEADER;
59
60 typedef struct _aviextheader
61 {
62     FOURCC fcc;
63     DWORD cb;
64     DWORD dwGrandFrames;
65     DWORD dwFuture[61];
66 } AVIEXTHEADER;
67
68
69 /* flags for dwFlags member of AVISTREAMHEADER */
70 #define AVISF_DISABLED         0x00000001
71 #define AVISF_VIDEO_PALCHANGES 0x00010000
72
73 typedef struct _avistreamheader
74 {
75     FOURCC fcc;
76     DWORD cb;
77     FOURCC fccType;
78     FOURCC fccHandler;
79     DWORD dwFlags;
80     WORD wPriority;
81     WORD wLanguage;
82     DWORD dwInitialFrames;
83     DWORD dwScale;
84     DWORD dwRate;
85     DWORD dwStart;
86     DWORD dwLength;
87     DWORD dwSuggestedBufferSize;
88     DWORD dwQuality;
89     DWORD dwSampleSize;
90     struct
91     {
92         short int left;
93         short int top;
94         short int right;
95         short int bottom;
96     } rcFrame;
97 } AVISTREAMHEADER;
98
99 /* flags for dwFlags member of _avioldindex_entry */
100 #define AVIIF_LIST       0x00000001
101 #define AVIIF_KEYFRAME   0x00000010
102 #define AVIIF_NO_TIME    0x00000100
103 #define AVIIF_COMPRESSOR 0x0FFF0000
104
105 typedef struct _avioldindex
106 {
107     FOURCC fcc;
108     DWORD cb;
109     struct _avioldindex_entry
110     {
111         DWORD dwChunkId;
112         DWORD dwFlags;
113         DWORD dwOffset;
114         DWORD dwSize;
115     } aIndex[0];
116 } AVIOLDINDEX;
117
118 typedef union _timecode
119 {
120     struct
121     {
122         WORD wFrameRate;
123         WORD wFrameFract;
124         LONG cFrames;
125     } DUMMYSTRUCTNAME;
126     DWORDLONG qw;
127 } TIMECODE;
128
129 #define TIMECODE_RATE_30DROP 0
130
131 /* flags for dwSMPTEflags member of TIMECODEDATA */
132 #define TIMECODE_SMPTE_BINARY_GROUP 0x07
133 #define TIMECODE_SMPTE_COLOR_FRAME  0x08
134
135 typedef struct _timecodedata
136 {
137     TIMECODE time;
138     DWORD dwSMPTEflags;
139     DWORD dwUser;
140 } TIMECODEDATA;
141
142 #define AVI_INDEX_OF_INDEXES      0x00
143 #define AVI_INDEX_OF_CHUNKS       0x01
144 #define AVI_INDEX_OF_TIMED_CHUNKS 0x02
145 #define AVI_INDEX_OF_SUB_2FIELD   0x03
146 #define AVI_INDEX_IS_DATA         0x80
147
148 #define AVI_INDEX_SUB_DEFAULT     0x00
149 #define AVI_INDEX_SUB_2FIELD      0x01
150
151 typedef struct _avimetaindex
152 {
153     FOURCC fcc;
154     UINT cb;
155     WORD wLongsPerEntry;
156     BYTE bIndexSubType;
157     BYTE bIndexType;
158     DWORD nEntriesInUse;
159     DWORD dwChunkId;
160     DWORD dwReserved[3];
161     DWORD adwIndex[0];
162 } AVIMETAINDEX;
163
164 /* FIXME: index structures missing */