blob: c63275b621c2e7b297be380a15fee9f027d69e37 [file] [log] [blame]
Robert Shearman367cf412003-10-24 04:20:05 +00001/*
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Robert Shearman367cf412003-10-24 04:20:05 +000017 */
18
19import "objidl.idl";
20
21/* trick widl into thinking that it knows the DirectDraw types
22 * as there is no IDL file for them (yet) */
23cpp_quote("#if 0")
24typedef void * LPDIRECTDRAW;
25typedef void DDSURFACEDESC,DDCAPS;
26typedef DWORD RGBQUAD;
27typedef LONGLONG REFERENCE_TIME;
28typedef struct
29{
30 DWORD biSize;
31 LONG biWidth;
32 LONG biHeight;
33 WORD biPlanes;
34 WORD biBitCount;
35 DWORD biCompression;
36 DWORD biSizeImage;
37 LONG biXPelsPerMeter;
38 LONG biYPelsPerMeter;
39 DWORD biClrUsed;
40 DWORD biClrImportant;
41} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
42cpp_quote("#endif")
43
44cpp_quote("#include <ddraw.h>")
45
46cpp_quote("#define AMDDS_NONE 0x00")
47cpp_quote("#define AMDDS_DCIPS 0x01")
48cpp_quote("#define AMDDS_PS 0x02")
49cpp_quote("#define AMDDS_RGBOVR 0x04")
50cpp_quote("#define AMDDS_YUVOVR 0x08")
51cpp_quote("#define AMDDS_RGBOFF 0x10")
52cpp_quote("#define AMDDS_YUVOFF 0x20")
53cpp_quote("#define AMDDS_RGBFLP 0x40")
54cpp_quote("#define AMDDS_YUVFLP 0x80")
55cpp_quote("#define AMDDS_ALL 0xFF")
56cpp_quote("#define AMDDS_DEFAULT AMDDS_ALL")
57
58cpp_quote("#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)")
59cpp_quote("#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)")
60cpp_quote("#define AMDSS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)")
61
62[
63 object,
64 pointer_default(unique)
65]
66interface IDirectDrawVideo : IUnknown
67{
68 HRESULT GetSwitches([out] DWORD * pSwitches);
69 HRESULT SetSwitches([in] DWORD Switches);
70 HRESULT GetCaps([out] DDCAPS * pCaps);
71 HRESULT GetEmulatedCaps([out] DDCAPS *pCaps);
72 HRESULT GetSurfaceDesc([out] DDSURFACEDESC * pSurfaceDesc);
73 HRESULT GetFourCCCodes([out] DWORD * pCount, [out] DWORD * pCodes);
74 HRESULT SetDirectDraw([in] LPDIRECTDRAW pDirectDraw);
75 HRESULT GetDirectDraw([out] LPDIRECTDRAW * ppDirectDraw);
76 HRESULT GetSurfaceType([out] DWORD * pSurfaceType);
77 HRESULT SetDefault();
78 HRESULT UseScanLine([in] long UseScanLine);
79 HRESULT CanUseScanLine([out] long * UseScanLine);
80 HRESULT UseOverlayStretch([in] long UseOverlayStretch);
81 HRESULT CanUseOverlayStretch([out] long * UseOverlayStretch);
82 HRESULT UseWhenFullScreen([in] long UseWhenFullScreen);
83 HRESULT WillUseFullScreen([out] long * UseWhenFullScreen);
84}
85
86[
87 object,
88 pointer_default(unique)
89]
90interface IQualProp : IUnknown
91{
Alexandre Julliardc477d602004-10-05 02:16:11 +000092 [propget] HRESULT FramesDroppedInRenderer([out] int * pcFrames);
93 [propget] HRESULT FramesDrawn([out] int * pcFramesDrawn);
94 [propget] HRESULT AvgFrameRate([out] int * piAvgFrameRate);
95 [propget] HRESULT Jitter([out] int * iJitter);
96 [propget] HRESULT AvgSyncOffset([out] int * piAvg);
97 [propget] HRESULT DevSyncOffset([out] int * piDev);
Robert Shearman367cf412003-10-24 04:20:05 +000098}
99
100[
101 object,
102 pointer_default(unique)
103]
104interface IFullScreenVideo : IUnknown
105{
106 HRESULT CountModes([out] long * pModes);
107 HRESULT GetModeInfo([in] long Mode, [out] long * pWidth, [out] long * pHeight, [out] long * pDepth);
108 HRESULT GetCurrentMode([out] long * pMode);
109 HRESULT IsModeAvailable([in] long Mode);
110 HRESULT IsModeEnabled([in] long Mode);
111 HRESULT SetEnabled([in] long Mode, [in] long bEnabled);
112 HRESULT GetClipFactor([out] long * pClipFactor);
113 HRESULT SetClipFactor([in] long ClipFactor);
114 HRESULT SetMessageDrain([in] HWND hwnd);
115 HRESULT GetMessageDrain([out] HWND * hwnd);
116 HRESULT SetMonitor([in] long Monitor);
117 HRESULT GetMonitor([out] long * Monitor);
118 HRESULT HideOnDeactivate([in] long Hide);
119 HRESULT IsHideOnDeactivate();
120 HRESULT SetCaption([in] BSTR strCaption);
121 HRESULT GetCaption([out] BSTR * pstrCaption);
122 HRESULT SetDefault();
123}
124
125[
126 object,
127 pointer_default(unique)
128]
129interface IFullScreenVideoEx : IFullScreenVideo
130{
131 HRESULT SetAcceleratorTable([in] HWND hwnd, [in] HACCEL hAccel);
132 HRESULT GetAcceleratorTable([out] HWND * phwnd, [out] HACCEL * phAccel);
133 HRESULT KeepPixelAspectRatio([in] long KeepAspect);
134 /* FIXME: not sure is this next method is an [out] */
135 HRESULT IsKeepPixelAspectRatio([out] long * pKeepAspect);
136}
137
138[
139 object,
140 pointer_default(unique)
141]
142interface IBaseVideoMixer : IUnknown
143{
144 HRESULT SetLeadPin([in] int iPin);
145 HRESULT GetLeadPin([out] int * piPin);
146 HRESULT GetInputPinCount([out] int * piPinCount);
147 HRESULT IsUsingClock([out] int * pbValue);
148 HRESULT SetUsingClock([in] int bValue);
149 HRESULT GetClockPeriod([out] int * pbValue);
150 HRESULT SetClockPeriod([in] int bValue);
151}
152
153#define iPALETTE_COLORS 256
154#define iMASK_COLORS 3
155
156cpp_quote("#define iPALETTE_COLORS 256")
157cpp_quote("#define iEGA_COLORS 16")
158cpp_quote("#define iMASK_COLORS 3")
159cpp_quote("#define iTRUECOLOR 16")
160cpp_quote("#define iRED 0")
161cpp_quote("#define iGREEN 1")
162cpp_quote("#define iBLUE 2")
163cpp_quote("#define iPALETTE 8")
164cpp_quote("#define iMAXBITS 8")
165
166typedef struct tag_TRUECOLORINFO
167{
168 DWORD dwBitMasks[iMASK_COLORS];
169 RGBQUAD bmiColors[iPALETTE_COLORS];
170} TRUECOLORINFO;
171
172typedef struct tagVIDEOINFOHEADER
173{
174 RECT rcSource;
175 RECT rcTarget;
176 DWORD dwBitRate;
177 DWORD dwBitErrorRate;
178 REFERENCE_TIME AvgTimePerFrame;
179
180 BITMAPINFOHEADER bmiHeader;
181} VIDEOINFOHEADER;
182
183typedef struct tagVIDEOINFO
184{
185 RECT rcSource;
186 RECT rcTarget;
187 DWORD dwBitRate;
188 DWORD dwBitErrorRate;
189 REFERENCE_TIME AvgTimePerFrame;
190
191 BITMAPINFOHEADER bmiHeader;
192
193 union
194 {
195 RGBQUAD bmiColors[iPALETTE_COLORS];
196 DWORD dwBitMasks[iMASK_COLORS];
197 TRUECOLORINFO TrueColorInfo;
198 };
199} VIDEOINFO;
200
201typedef struct tagMPEG1VIDEOINFO
202{
203 VIDEOINFOHEADER hdr;
204 DWORD dwStartTimeCode;
205 DWORD cbSequenceHeader;
206 BYTE bSequenceHeader[1];
207} MPEG1VIDEOINFO;
208
209cpp_quote("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
210cpp_quote("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
211
212typedef struct tagAnalogVideoInfo
213{
214 RECT rcSource;
215 RECT rcTarget;
216 DWORD dwActiveWidth;
217 DWORD dwActiveHeight;
218 REFERENCE_TIME AvgTimePerFrame;
219} ANALOGVIDEOINFO;
220
221typedef enum
222{
223 AM_PROPERTY_FRAMESTEP_STEP = 0x01,
224 AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
225 AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
226 AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
227} AM_PROPERTY_FRAMESTEP;
228
229typedef struct _AM_FRAMESTEP_STEP
230{
231 DWORD dwFramesToStep;
232} AM_FRAMESTEP_STEP;