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 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | import "objidl.idl";
|
---|
29 |
|
---|
30 | /* trick widl into thinking that it knows the DirectDraw types
|
---|
31 | * as there is no IDL file for them (yet) */
|
---|
32 | cpp_quote("#if 0")
|
---|
33 | interface IDirectDraw;
|
---|
34 | typedef void DDSURFACEDESC,DDCAPS;
|
---|
35 | typedef DWORD RGBQUAD;
|
---|
36 | typedef LONGLONG REFERENCE_TIME;
|
---|
37 | typedef struct
|
---|
38 | {
|
---|
39 | DWORD biSize;
|
---|
40 | LONG biWidth;
|
---|
41 | LONG biHeight;
|
---|
42 | WORD biPlanes;
|
---|
43 | WORD biBitCount;
|
---|
44 | DWORD biCompression;
|
---|
45 | DWORD biSizeImage;
|
---|
46 | LONG biXPelsPerMeter;
|
---|
47 | LONG biYPelsPerMeter;
|
---|
48 | DWORD biClrUsed;
|
---|
49 | DWORD biClrImportant;
|
---|
50 | } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
|
---|
51 | cpp_quote("#endif")
|
---|
52 |
|
---|
53 | cpp_quote("#include <ddraw.h>")
|
---|
54 |
|
---|
55 | cpp_quote("#define AMDDS_NONE 0x00")
|
---|
56 | cpp_quote("#define AMDDS_DCIPS 0x01")
|
---|
57 | cpp_quote("#define AMDDS_PS 0x02")
|
---|
58 | cpp_quote("#define AMDDS_RGBOVR 0x04")
|
---|
59 | cpp_quote("#define AMDDS_YUVOVR 0x08")
|
---|
60 | cpp_quote("#define AMDDS_RGBOFF 0x10")
|
---|
61 | cpp_quote("#define AMDDS_YUVOFF 0x20")
|
---|
62 | cpp_quote("#define AMDDS_RGBFLP 0x40")
|
---|
63 | cpp_quote("#define AMDDS_YUVFLP 0x80")
|
---|
64 | cpp_quote("#define AMDDS_ALL 0xFF")
|
---|
65 | cpp_quote("#define AMDDS_DEFAULT AMDDS_ALL")
|
---|
66 |
|
---|
67 | cpp_quote("#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)")
|
---|
68 | cpp_quote("#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)")
|
---|
69 | cpp_quote("#define AMDSS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)")
|
---|
70 |
|
---|
71 | [
|
---|
72 | object,
|
---|
73 | /* uuid(36d39eb0-dd75-11ce-bf0e-00aa0055595a) conflicts with uuids.h */
|
---|
74 | pointer_default(unique),
|
---|
75 | local
|
---|
76 | ]
|
---|
77 | interface IDirectDrawVideo : IUnknown
|
---|
78 | {
|
---|
79 | HRESULT GetSwitches([out] DWORD * pSwitches);
|
---|
80 | HRESULT SetSwitches([in] DWORD Switches);
|
---|
81 | HRESULT GetCaps([out] DDCAPS * pCaps);
|
---|
82 | HRESULT GetEmulatedCaps([out] DDCAPS *pCaps);
|
---|
83 | HRESULT GetSurfaceDesc([out] DDSURFACEDESC * pSurfaceDesc);
|
---|
84 | HRESULT GetFourCCCodes([out] DWORD * pCount, [out] DWORD * pCodes);
|
---|
85 | HRESULT SetDirectDraw([in] IDirectDraw *ddraw);
|
---|
86 | HRESULT GetDirectDraw([out] IDirectDraw **ddraw);
|
---|
87 | HRESULT GetSurfaceType([out] DWORD * pSurfaceType);
|
---|
88 | HRESULT SetDefault();
|
---|
89 | HRESULT UseScanLine([in] long UseScanLine);
|
---|
90 | HRESULT CanUseScanLine([out] long * UseScanLine);
|
---|
91 | HRESULT UseOverlayStretch([in] long UseOverlayStretch);
|
---|
92 | HRESULT CanUseOverlayStretch([out] long * UseOverlayStretch);
|
---|
93 | HRESULT UseWhenFullScreen([in] long UseWhenFullScreen);
|
---|
94 | HRESULT WillUseFullScreen([out] long * UseWhenFullScreen);
|
---|
95 | }
|
---|
96 |
|
---|
97 | [
|
---|
98 | object,
|
---|
99 | /* uuid(1bd0ecb0-f8e2-11ce-aac6-0020af0b99a3) conflicts with uuids.h */
|
---|
100 | pointer_default(unique),
|
---|
101 | local
|
---|
102 | ]
|
---|
103 | interface IQualProp : IUnknown
|
---|
104 | {
|
---|
105 | [propget] HRESULT FramesDroppedInRenderer([out] int * pcFrames);
|
---|
106 | [propget] HRESULT FramesDrawn([out] int * pcFramesDrawn);
|
---|
107 | [propget] HRESULT AvgFrameRate([out] int * piAvgFrameRate);
|
---|
108 | [propget] HRESULT Jitter([out] int * iJitter);
|
---|
109 | [propget] HRESULT AvgSyncOffset([out] int * piAvg);
|
---|
110 | [propget] HRESULT DevSyncOffset([out] int * piDev);
|
---|
111 | }
|
---|
112 |
|
---|
113 | [
|
---|
114 | object,
|
---|
115 | /* uuid(dd1d7110-7836-11cf-bf47-00aa0055595a) conflicts with uuids.h */
|
---|
116 | pointer_default(unique)
|
---|
117 | ]
|
---|
118 | interface IFullScreenVideo : IUnknown
|
---|
119 | {
|
---|
120 | HRESULT CountModes([out] long * pModes);
|
---|
121 | HRESULT GetModeInfo([in] long Mode, [out] long * pWidth, [out] long * pHeight, [out] long * pDepth);
|
---|
122 | HRESULT GetCurrentMode([out] long * pMode);
|
---|
123 | HRESULT IsModeAvailable([in] long Mode);
|
---|
124 | HRESULT IsModeEnabled([in] long Mode);
|
---|
125 | HRESULT SetEnabled([in] long Mode, [in] long bEnabled);
|
---|
126 | HRESULT GetClipFactor([out] long * pClipFactor);
|
---|
127 | HRESULT SetClipFactor([in] long ClipFactor);
|
---|
128 | HRESULT SetMessageDrain([in] HWND hwnd);
|
---|
129 | HRESULT GetMessageDrain([out] HWND * hwnd);
|
---|
130 | HRESULT SetMonitor([in] long Monitor);
|
---|
131 | HRESULT GetMonitor([out] long * Monitor);
|
---|
132 | HRESULT HideOnDeactivate([in] long Hide);
|
---|
133 | HRESULT IsHideOnDeactivate();
|
---|
134 | HRESULT SetCaption([in] BSTR strCaption);
|
---|
135 | HRESULT GetCaption([out] BSTR * pstrCaption);
|
---|
136 | HRESULT SetDefault();
|
---|
137 | }
|
---|
138 |
|
---|
139 | [
|
---|
140 | object,
|
---|
141 | /* uuid(53479470-f1dd-11cf-bc42-00aa00ac74f6) conflicts with uuids.h */
|
---|
142 | pointer_default(unique),
|
---|
143 | local
|
---|
144 | ]
|
---|
145 | interface IFullScreenVideoEx : IFullScreenVideo
|
---|
146 | {
|
---|
147 | HRESULT SetAcceleratorTable([in] HWND hwnd, [in] HACCEL hAccel);
|
---|
148 | HRESULT GetAcceleratorTable([out] HWND * phwnd, [out] HACCEL * phAccel);
|
---|
149 | HRESULT KeepPixelAspectRatio([in] long KeepAspect);
|
---|
150 | /* FIXME: not sure is this next method is an [out] */
|
---|
151 | HRESULT IsKeepPixelAspectRatio([out] long * pKeepAspect);
|
---|
152 | }
|
---|
153 |
|
---|
154 | [
|
---|
155 | object,
|
---|
156 | /* uuid(61ded640-e912-11ce-a099-00aa00479a58) conflicts with uuids.h */
|
---|
157 | pointer_default(unique),
|
---|
158 | local
|
---|
159 | ]
|
---|
160 | interface IBaseVideoMixer : IUnknown
|
---|
161 | {
|
---|
162 | HRESULT SetLeadPin([in] int iPin);
|
---|
163 | HRESULT GetLeadPin([out] int * piPin);
|
---|
164 | HRESULT GetInputPinCount([out] int * piPinCount);
|
---|
165 | HRESULT IsUsingClock([out] int * pbValue);
|
---|
166 | HRESULT SetUsingClock([in] int bValue);
|
---|
167 | HRESULT GetClockPeriod([out] int * pbValue);
|
---|
168 | HRESULT SetClockPeriod([in] int bValue);
|
---|
169 | }
|
---|
170 |
|
---|
171 | #define iPALETTE_COLORS 256
|
---|
172 | #define iMASK_COLORS 3
|
---|
173 |
|
---|
174 | cpp_quote("#define iPALETTE_COLORS 256")
|
---|
175 | cpp_quote("#define iEGA_COLORS 16")
|
---|
176 | cpp_quote("#define iMASK_COLORS 3")
|
---|
177 | cpp_quote("#define iTRUECOLOR 16")
|
---|
178 | cpp_quote("#define iRED 0")
|
---|
179 | cpp_quote("#define iGREEN 1")
|
---|
180 | cpp_quote("#define iBLUE 2")
|
---|
181 | cpp_quote("#define iPALETTE 8")
|
---|
182 | cpp_quote("#define iMAXBITS 8")
|
---|
183 |
|
---|
184 | typedef struct tag_TRUECOLORINFO
|
---|
185 | {
|
---|
186 | DWORD dwBitMasks[iMASK_COLORS];
|
---|
187 | RGBQUAD bmiColors[iPALETTE_COLORS];
|
---|
188 | } TRUECOLORINFO;
|
---|
189 |
|
---|
190 | typedef struct tagVIDEOINFOHEADER
|
---|
191 | {
|
---|
192 | RECT rcSource;
|
---|
193 | RECT rcTarget;
|
---|
194 | DWORD dwBitRate;
|
---|
195 | DWORD dwBitErrorRate;
|
---|
196 | REFERENCE_TIME AvgTimePerFrame;
|
---|
197 |
|
---|
198 | BITMAPINFOHEADER bmiHeader;
|
---|
199 | } VIDEOINFOHEADER;
|
---|
200 |
|
---|
201 | typedef struct tagVIDEOINFO
|
---|
202 | {
|
---|
203 | RECT rcSource;
|
---|
204 | RECT rcTarget;
|
---|
205 | DWORD dwBitRate;
|
---|
206 | DWORD dwBitErrorRate;
|
---|
207 | REFERENCE_TIME AvgTimePerFrame;
|
---|
208 |
|
---|
209 | BITMAPINFOHEADER bmiHeader;
|
---|
210 |
|
---|
211 | union
|
---|
212 | {
|
---|
213 | RGBQUAD bmiColors[iPALETTE_COLORS];
|
---|
214 | DWORD dwBitMasks[iMASK_COLORS];
|
---|
215 | TRUECOLORINFO TrueColorInfo;
|
---|
216 | };
|
---|
217 | } VIDEOINFO;
|
---|
218 |
|
---|
219 | typedef struct tagMPEG1VIDEOINFO
|
---|
220 | {
|
---|
221 | VIDEOINFOHEADER hdr;
|
---|
222 | DWORD dwStartTimeCode;
|
---|
223 | DWORD cbSequenceHeader;
|
---|
224 | BYTE bSequenceHeader[1];
|
---|
225 | } MPEG1VIDEOINFO;
|
---|
226 |
|
---|
227 | cpp_quote("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
|
---|
228 | cpp_quote("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
|
---|
229 |
|
---|
230 | typedef struct tagAnalogVideoInfo
|
---|
231 | {
|
---|
232 | RECT rcSource;
|
---|
233 | RECT rcTarget;
|
---|
234 | DWORD dwActiveWidth;
|
---|
235 | DWORD dwActiveHeight;
|
---|
236 | REFERENCE_TIME AvgTimePerFrame;
|
---|
237 | } ANALOGVIDEOINFO;
|
---|
238 |
|
---|
239 | typedef enum
|
---|
240 | {
|
---|
241 | AM_PROPERTY_FRAMESTEP_STEP = 0x01,
|
---|
242 | AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
|
---|
243 | AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
|
---|
244 | AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
|
---|
245 | } AM_PROPERTY_FRAMESTEP;
|
---|
246 |
|
---|
247 | typedef struct _AM_FRAMESTEP_STEP
|
---|
248 | {
|
---|
249 | DWORD dwFramesToStep;
|
---|
250 | } AM_FRAMESTEP_STEP;
|
---|