1545
|
1 #ifndef __LIBWIN32_H
|
|
2 #define __LIBWIN32_H
|
|
3
|
3063
|
4 #ifndef NOAVIFILE_HEADERS
|
|
5 #error this header file should not be used without -DNOAVIFILE_HEADERS
|
|
6 #endif
|
1545
|
7
|
3063
|
8 // this file is only included when NOAVIFILE_HEADERS are defined
|
|
9 // serves mainly for mplayer
|
1545
|
10
|
3063
|
11 #define VFW_E_NOT_RUNNING 0x80040226
|
1545
|
12
|
3063
|
13 #include <inttypes.h>
|
1545
|
14
|
1558
|
15 //#define FATAL(a) // you don't need exception - if you want - just fill more code
|
3063
|
16 #include "wine/mmreg.h"
|
|
17 #include "wine/winreg.h"
|
|
18 #include "wine/vfw.h"
|
|
19 #include "com.h"
|
|
20
|
|
21 typedef uint32_t fourcc_t;
|
|
22
|
|
23 /*
|
|
24 typedef struct _FatalError
|
|
25 {
|
|
26 FatalError();
|
|
27 void PrintAll() {}
|
|
28 }FatalError;
|
|
29 */
|
|
30
|
|
31 typedef struct _CodecInfo
|
|
32 {
|
|
33 char* dll;
|
|
34 GUID* guid;
|
|
35 }CodecInfo;
|
|
36
|
1545
|
37
|
3063
|
38 typedef struct _CImage // public your_libvo_mem
|
|
39 {
|
|
40 char* ptr;
|
|
41
|
|
42 /*char* (*Data)();
|
|
43 {
|
|
44 return 0;
|
|
45 // pointer to memory block
|
|
46 }*/
|
|
47 /*int (*Supported)(fourcc_t csp, int bits);
|
|
48 {
|
|
49 return true;
|
|
50 // if you support such surface
|
|
51 }*/
|
|
52 }CImage;
|
2069
|
53
|
1558
|
54
|
3063
|
55 #if 0
|
|
56 struct BitmapInfo : public BITMAPINFOHEADER
|
|
57 {
|
|
58 void SetBits(int b) { return; /*fixme*/ }
|
|
59 void SetSpace(int b) { return; /*fixme*/ }
|
|
60 };
|
|
61 #endif
|
|
62
|
|
63 typedef struct _IAudioDecoder
|
1545
|
64 {
|
3063
|
65 WAVEFORMATEX in_fmt;
|
|
66 CodecInfo record;
|
|
67 /*(*IAudioDecoder)( CodecInfo * r, const WAVEFORMATEX* w);
|
|
68 {
|
|
69 memcpy(&this->record,r,sizeof(CodecInfo));
|
|
70 in_fmt = *w;
|
|
71 }*/
|
|
72 }IAudioDecoder;
|
|
73
|
|
74 /*
|
|
75 struct IAudioEncoder
|
|
76 {
|
|
77 IAudioEncoder(const CodecInfo&, WAVEFORMATEX*) {}
|
|
78 // you do not need this one...
|
|
79 };
|
|
80 */
|
|
81
|
|
82 enum CAPS
|
1558
|
83 {
|
3063
|
84 CAP_NONE = 0,
|
|
85 CAP_YUY2 = 1,
|
|
86 CAP_YV12 = 2,
|
|
87 CAP_IYUV = 4,
|
|
88 CAP_UYVY = 8,
|
|
89 CAP_YVYU = 16,
|
|
90 CAP_I420 = 32,
|
|
91 };
|
|
92 enum DecodingMode
|
|
93 {
|
|
94 DIRECT = 0,
|
|
95 REALTIME,
|
|
96 REALTIME_QUALITY_AUTO,
|
|
97 };
|
|
98 enum DecodingState
|
|
99 {
|
|
100 STOP = 0,
|
|
101 START,
|
|
102 };
|
1545
|
103
|
3063
|
104 typedef struct _BitmapInfo
|
|
105 {
|
|
106 long biSize;
|
|
107 long biWidth;
|
|
108 long biHeight;
|
|
109 short biPlanes;
|
|
110 short biBitCount;
|
|
111 long biCompression;
|
|
112 long biSizeImage;
|
|
113 long biXPelsPerMeter;
|
|
114 long biYPelsPerMeter;
|
|
115 long biClrUsed;
|
|
116 long biClrImportant;
|
|
117 int colors[3];
|
|
118 } BitmapInfo;
|
|
119
|
|
120 typedef struct _IVideoDecoder
|
1545
|
121 {
|
3063
|
122 int VBUFSIZE;
|
|
123 int QMARKHI;
|
|
124 int QMARKLO;
|
|
125 int DMARKHI;
|
|
126 int DMARKLO;
|
1545
|
127
|
3063
|
128 /*
|
|
129 IVideoDecoder(CodecInfo& info, const BITMAPINFOHEADER& format) : record(info)
|
|
130 {
|
|
131 // implement init part
|
|
132 }
|
|
133 virtual ~IVideoDecoder();
|
|
134 void Stop()
|
|
135 {
|
|
136 }
|
|
137 void Start()
|
|
138 {
|
|
139 }
|
|
140 */
|
|
141 const CodecInfo record;
|
|
142 int m_Mode; // should we do precaching (or even change Quality on the fly)
|
|
143 int m_State;
|
|
144 int m_iDecpos;
|
|
145 int m_iPlaypos;
|
|
146 float m_fQuality; // quality for the progress bar 0..1(best)
|
|
147 int m_bCapable16b;
|
|
148
|
|
149 BITMAPINFOHEADER* m_bh; // format of input data (might be larger - e.g. huffyuv)
|
|
150 BitmapInfo m_decoder; // format of decoder output
|
|
151 BitmapInfo m_obh; // format of returned frames
|
|
152 }IVideoDecoder;
|
|
153
|
|
154 /*
|
|
155 struct IRtConfig
|
|
156 {
|
1545
|
157 };
|
3063
|
158 */
|
1545
|
159
|
|
160 // might be minimalized to contain just those which are needed by DS_VideoDecoder
|
|
161
|
|
162 #ifndef mmioFOURCC
|
|
163 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
|
|
164 ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \
|
|
165 ( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
|
|
166 #endif /* mmioFOURCC */
|
|
167
|
|
168 /* OpenDivX */
|
|
169 #define fccMP4S mmioFOURCC('M', 'P', '4', 'S')
|
|
170 #define fccmp4s mmioFOURCC('m', 'p', '4', 's')
|
|
171 #define fccDIVX mmioFOURCC('D', 'I', 'V', 'X')
|
|
172 #define fccdivx mmioFOURCC('d', 'i', 'v', 'x')
|
|
173 #define fccDIV1 mmioFOURCC('D', 'I', 'V', '1')
|
|
174 #define fccdiv1 mmioFOURCC('d', 'i', 'v', '1')
|
|
175
|
|
176 /* DivX codecs */
|
|
177 #define fccDIV2 mmioFOURCC('D', 'I', 'V', '2')
|
|
178 #define fccdiv2 mmioFOURCC('d', 'i', 'v', '2')
|
|
179 #define fccDIV3 mmioFOURCC('D', 'I', 'V', '3')
|
|
180 #define fccdiv3 mmioFOURCC('d', 'i', 'v', '3')
|
|
181 #define fccDIV4 mmioFOURCC('D', 'I', 'V', '4')
|
|
182 #define fccdiv4 mmioFOURCC('d', 'i', 'v', '4')
|
|
183 #define fccDIV5 mmioFOURCC('D', 'I', 'V', '5')
|
|
184 #define fccdiv5 mmioFOURCC('d', 'i', 'v', '5')
|
|
185 #define fccDIV6 mmioFOURCC('D', 'I', 'V', '6')
|
|
186 #define fccdiv6 mmioFOURCC('d', 'i', 'v', '6')
|
|
187 #define fccMP41 mmioFOURCC('M', 'P', '4', '1')
|
|
188 #define fccmp41 mmioFOURCC('m', 'p', '4', '1')
|
|
189 #define fccMP43 mmioFOURCC('M', 'P', '4', '3')
|
|
190 #define fccmp43 mmioFOURCC('m', 'p', '4', '3')
|
|
191 /* old ms mpeg-4 codecs */
|
|
192 #define fccMP42 mmioFOURCC('M', 'P', '4', '2')
|
|
193 #define fccmp42 mmioFOURCC('m', 'p', '4', '2')
|
|
194 #define fccMPG4 mmioFOURCC('M', 'P', 'G', '4')
|
|
195 #define fccmpg4 mmioFOURCC('m', 'p', 'g', '4')
|
|
196 /* Windows media codecs */
|
|
197 #define fccWMV1 mmioFOURCC('W', 'M', 'V', '1')
|
|
198 #define fccwmv1 mmioFOURCC('w', 'm', 'v', '1')
|
|
199 #define fccWMV2 mmioFOURCC('W', 'M', 'V', '2')
|
|
200 #define fccwmv2 mmioFOURCC('w', 'm', 'v', '2')
|
|
201 #define fccMWV1 mmioFOURCC('M', 'W', 'V', '1')
|
|
202
|
|
203 /* Angel codecs */
|
|
204 #define fccAP41 mmioFOURCC('A', 'P', '4', '1')
|
|
205 #define fccap41 mmioFOURCC('a', 'p', '4', '1')
|
|
206 #define fccAP42 mmioFOURCC('A', 'P', '4', '2')
|
|
207 #define fccap42 mmioFOURCC('a', 'p', '4', '2')
|
|
208
|
|
209 /* other codecs */
|
|
210 #define fccIV31 mmioFOURCC('I', 'V', '3', '1')
|
|
211 #define fcciv31 mmioFOURCC('i', 'v', '3', '1')
|
|
212 #define fccIV32 mmioFOURCC('I', 'V', '3', '2')
|
|
213 #define fcciv32 mmioFOURCC('i', 'v', '3', '2')
|
|
214 #define fccIV41 mmioFOURCC('I', 'V', '4', '1')
|
|
215 #define fcciv41 mmioFOURCC('i', 'v', '4', '1')
|
|
216 #define fccIV50 mmioFOURCC('I', 'V', '5', '0')
|
|
217 #define fcciv50 mmioFOURCC('i', 'v', '5', '0')
|
|
218 #define fccI263 mmioFOURCC('I', '2', '6', '3')
|
|
219 #define fcci263 mmioFOURCC('i', '2', '6', '3')
|
|
220
|
|
221 #define fccMJPG mmioFOURCC('M', 'J', 'P', 'G')
|
|
222 #define fccmjpg mmioFOURCC('m', 'j', 'p', 'g')
|
|
223
|
|
224 #define fccHFYU mmioFOURCC('H', 'F', 'Y', 'U')
|
|
225
|
|
226 #define fcccvid mmioFOURCC('c', 'v', 'i', 'd')
|
|
227 #define fccdvsd mmioFOURCC('d', 'v', 's', 'd')
|
|
228
|
|
229 /* Ati codecs */
|
|
230 #define fccVCR2 mmioFOURCC('V', 'C', 'R', '2')
|
|
231 #define fccVCR1 mmioFOURCC('V', 'C', 'R', '1')
|
|
232 #define fccVYUY mmioFOURCC('V', 'Y', 'U', 'Y')
|
|
233 #define fccYVU9 mmioFOURCC('I', 'Y', 'U', '9')
|
|
234
|
|
235 /* Asus codecs */
|
|
236 #define fccASV1 mmioFOURCC('A', 'S', 'V', '1')
|
|
237 #define fccASV2 mmioFOURCC('A', 'S', 'V', '2')
|
|
238
|
|
239 /* Microsoft video */
|
|
240 #define fcccram mmioFOURCC('c', 'r', 'a', 'm')
|
|
241 #define fccCRAM mmioFOURCC('C', 'R', 'A', 'M')
|
|
242 #define fccMSVC mmioFOURCC('M', 'S', 'V', 'C')
|
|
243
|
|
244
|
|
245 #define fccMSZH mmioFOURCC('M', 'S', 'Z', 'H')
|
|
246
|
|
247 #define fccZLIB mmioFOURCC('Z', 'L', 'I', 'B')
|
|
248
|
|
249 #define fccTM20 mmioFOURCC('T', 'M', '2', '0')
|
|
250
|
|
251 #define fccYUV mmioFOURCC('Y', 'U', 'V', ' ')
|
|
252 #define fccYUY2 mmioFOURCC('Y', 'U', 'Y', '2')
|
|
253 #define fccYV12 mmioFOURCC('Y', 'V', '1', '2')/* Planar mode: Y + V + U (3 planes) */
|
|
254 #define fccI420 mmioFOURCC('I', '4', '2', '0')
|
|
255 #define fccIYUV mmioFOURCC('I', 'Y', 'U', 'V')/* Planar mode: Y + U + V (3 planes) */
|
|
256 #define fccUYVY mmioFOURCC('U', 'Y', 'V', 'Y')/* Packed mode: U0+Y0+V0+Y1 (1 plane) */
|
|
257 #define fccYVYU mmioFOURCC('Y', 'V', 'Y', 'U')/* Packed mode: Y0+V0+Y1+U0 (1 plane) */
|
|
258
|
|
259 #endif
|