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