2 * Copyright (C) 2001 Hidenori Takeshima
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_AMVIDEO_H_
20 #define __WINE_AMVIDEO_H_
25 typedef struct IBaseVideoMixer IBaseVideoMixer;
26 typedef struct IDirectDrawVideo IDirectDrawVideo;
27 typedef struct IFullScreenVideo IFullScreenVideo;
28 typedef struct IFullScreenVideoEx IFullScreenVideoEx;
29 typedef struct IQualProp IQualProp;
32 #define iEGA_COLORS 16
33 #define iPALETTE_COLORS 256
34 #define iMASK_COLORS 3
39 #define WIDTHBYTES(bits) ((DWORD)((((DWORD)(bits)+31U)&(~31U))>>3))
40 #define DIBWIDTHBYTES(bi) ((DWORD)WIDTHBYTES((bi).biWidth*(bi).biBitCount))
41 #define DIBSIZE(bi) (DIBWIDTHBYTES(bi)*(DWORD)abs((bi).biHeight))
46 DWORD dwBitMasks[iMASK_COLORS];
47 RGBQUAD bmiColors[iPALETTE_COLORS];
56 REFERENCE_TIME AvgTimePerFrame;
57 BITMAPINFOHEADER bmiHeader;
66 REFERENCE_TIME AvgTimePerFrame;
67 BITMAPINFOHEADER bmiHeader;
70 RGBQUAD bmiColors[iPALETTE_COLORS];
71 DWORD dwBitMasks[iMASK_COLORS];
72 TRUECOLORINFO TrueColorInfo;
79 DWORD dwStartTimeCode;
80 DWORD cbSequenceHeader;
81 BYTE bSequenceHeader[1];
90 REFERENCE_TIME AvgTimePerFrame;
94 /**************************************************************************
96 * IBaseVideoMixer interface
100 #define ICOM_INTERFACE IBaseVideoMixer
101 #define IBaseVideoMixer_METHODS \
102 ICOM_METHOD1(HRESULT,SetLeadPin,int,a1) \
103 ICOM_METHOD1(HRESULT,GetLeadPin,int*,a1) \
104 ICOM_METHOD1(HRESULT,GetInputPinCount,int*,a1) \
105 ICOM_METHOD1(HRESULT,IsUsingClock,int*,a1) \
106 ICOM_METHOD1(HRESULT,SetUsingClock,int,a1) \
107 ICOM_METHOD1(HRESULT,GetClockPeriod,int*,a1) \
108 ICOM_METHOD1(HRESULT,SetClockPeriod,int,a1)
110 #define IBaseVideoMixer_IMETHODS \
112 IBaseVideoMixer_METHODS
114 ICOM_DEFINE(IBaseVideoMixer,IUnknown)
115 #undef ICOM_INTERFACE
117 /*** IUnknown methods ***/
118 #define IBaseVideoMixer_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
119 #define IBaseVideoMixer_AddRef(p) ICOM_CALL (AddRef,p)
120 #define IBaseVideoMixer_Release(p) ICOM_CALL (Release,p)
121 /*** IBaseVideoMixer methods ***/
122 #define IBaseVideoMixer_SetLeadPin(p,a1) ICOM_CALL1(SetLeadPin,p,a1)
123 #define IBaseVideoMixer_GetLeadPin(p,a1) ICOM_CALL1(GetLeadPin,p,a1)
124 #define IBaseVideoMixer_GetInputPinCount(p,a1) ICOM_CALL1(GetInputPinCount,p,a1)
125 #define IBaseVideoMixer_IsUsingClock(p,a1) ICOM_CALL1(IsUsingClock,p,a1)
126 #define IBaseVideoMixer_SetUsingClock(p,a1) ICOM_CALL1(SetUsingClock,p,a1)
127 #define IBaseVideoMixer_GetClockPeriod(p,a1) ICOM_CALL1(GetClockPeriod,p,a1)
128 #define IBaseVideoMixer_SetClockPeriod(p,a1) ICOM_CALL1(SetClockPeriod,p,a1)
130 /**************************************************************************
132 * IDirectDrawVideo interface
136 #define ICOM_INTERFACE IDirectDrawVideo
137 #define IDirectDrawVideo_METHODS \
138 ICOM_METHOD1(HRESULT,GetSwitches,DWORD*,a1) \
139 ICOM_METHOD1(HRESULT,SetSwitches,DWORD,a1) \
140 ICOM_METHOD1(HRESULT,GetCaps,DDCAPS*,a1) \
141 ICOM_METHOD1(HRESULT,GetEmulatedCaps,DDCAPS*,a1) \
142 ICOM_METHOD1(HRESULT,GetSurfaceDesc,DDSURFACEDESC*,a1) \
143 ICOM_METHOD2(HRESULT,GetFourCCCodes,DWORD*,a1,DWORD*,a2) \
144 ICOM_METHOD1(HRESULT,SetDirectDraw,LPDIRECTDRAW,a1) \
145 ICOM_METHOD1(HRESULT,GetDirectDraw,LPDIRECTDRAW*,a1) \
146 ICOM_METHOD1(HRESULT,GetSurfaceType,DWORD*,a1) \
147 ICOM_METHOD(HRESULT,SetDefault) \
148 ICOM_METHOD1(HRESULT,UseScanLine,long,a1) \
149 ICOM_METHOD1(HRESULT,CanUseScanLine,long*,a1) \
150 ICOM_METHOD1(HRESULT,UseOverlayStretch,long,a1) \
151 ICOM_METHOD1(HRESULT,CanUseOverlayStretch,long*,a1) \
152 ICOM_METHOD1(HRESULT,UseWhenFullScreen,long,a1) \
153 ICOM_METHOD1(HRESULT,WillUseFullScreen,long*,a1)
155 #define IDirectDrawVideo_IMETHODS \
157 IDirectDrawVideo_METHODS
159 ICOM_DEFINE(IDirectDrawVideo,IUnknown)
160 #undef ICOM_INTERFACE
162 /*** IUnknown methods ***/
163 #define IDirectDrawVideo_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
164 #define IDirectDrawVideo_AddRef(p) ICOM_CALL (AddRef,p)
165 #define IDirectDrawVideo_Release(p) ICOM_CALL (Release,p)
166 /*** IDirectDrawVideo methods ***/
167 #define IDirectDrawVideo_GetSwitches(p,a1) ICOM_CALL1(GetSwitches,p,a1)
168 #define IDirectDrawVideo_SetSwitches(p,a1) ICOM_CALL1(SetSwitches,p,a1)
169 #define IDirectDrawVideo_GetCaps(p,a1) ICOM_CALL1(GetCaps,p,a1)
170 #define IDirectDrawVideo_GetEmulatedCaps(p,a1) ICOM_CALL1(GetEmulatedCaps,p,a1)
171 #define IDirectDrawVideo_GetSurfaceDesc(p,a1) ICOM_CALL1(GetSurfaceDesc,p,a1)
172 #define IDirectDrawVideo_GetFourCCCodes(p,a1,a2) ICOM_CALL2(GetFourCCCodes,p,a1,a2)
173 #define IDirectDrawVideo_SetDirectDraw(p,a1) ICOM_CALL1(SetDirectDraw,p,a1)
174 #define IDirectDrawVideo_GetDirectDraw(p,a1) ICOM_CALL1(GetDirectDraw,p,a1)
175 #define IDirectDrawVideo_GetSurfaceType(p,a1) ICOM_CALL1(GetSurfaceType,p,a1)
176 #define IDirectDrawVideo_SetDefault(p) ICOM_CALL (SetDefault,p)
177 #define IDirectDrawVideo_UseScanLine(p,a1) ICOM_CALL1(UseScanLine,p,a1)
178 #define IDirectDrawVideo_CanUseScanLine(p,a1) ICOM_CALL1(CanUseScanLine,p,a1)
179 #define IDirectDrawVideo_UseOverlayStretch(p,a1) ICOM_CALL1(UseOverlayStretch,p,a1)
180 #define IDirectDrawVideo_CanUseOverlayStretch(p,a1) ICOM_CALL1(CanUseOverlayStretch,p,a1)
181 #define IDirectDrawVideo_UseWhenFullScreen(p,a1) ICOM_CALL1(UseWhenFullScreen,p,a1)
182 #define IDirectDrawVideo_WillUseFullScreen(p,a1) ICOM_CALL1(WillUseFullScreen,p,a1)
184 /**************************************************************************
186 * IFullScreenVideo interface
190 #define ICOM_INTERFACE IFullScreenVideo
191 #define IFullScreenVideo_METHODS \
192 ICOM_METHOD1(HRESULT,CountModes,long*,a1) \
193 ICOM_METHOD4(HRESULT,GetModeInfo,long,a1,long*,a2,long*,a3,long*,a4) \
194 ICOM_METHOD1(HRESULT,GetCurrentMode,long*,a1) \
195 ICOM_METHOD1(HRESULT,IsModeAvailable,long,a1) \
196 ICOM_METHOD1(HRESULT,IsModeEnabled,long,a1) \
197 ICOM_METHOD2(HRESULT,SetEnabled,long,a1,long,a2) \
198 ICOM_METHOD1(HRESULT,GetClipFactor,long*,a1) \
199 ICOM_METHOD1(HRESULT,SetClipFactor,long,a1) \
200 ICOM_METHOD1(HRESULT,SetMessageDrain,HWND,a1) \
201 ICOM_METHOD1(HRESULT,GetMessageDrain,HWND*,a1) \
202 ICOM_METHOD1(HRESULT,SetMonitor,long,a1) \
203 ICOM_METHOD1(HRESULT,GetMonitor,long*,a1) \
204 ICOM_METHOD1(HRESULT,HideOnDeactivate,long,a1) \
205 ICOM_METHOD(HRESULT,IsHideOnDeactivate) \
206 ICOM_METHOD1(HRESULT,SetCaption,BSTR,a1) \
207 ICOM_METHOD1(HRESULT,GetCaption,BSTR*,a1) \
208 ICOM_METHOD(HRESULT,SetDefault)
210 #define IFullScreenVideo_IMETHODS \
212 IFullScreenVideo_METHODS
214 ICOM_DEFINE(IFullScreenVideo,IUnknown)
215 #undef ICOM_INTERFACE
217 /*** IUnknown methods ***/
218 #define IFullScreenVideo_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
219 #define IFullScreenVideo_AddRef(p) ICOM_CALL (AddRef,p)
220 #define IFullScreenVideo_Release(p) ICOM_CALL (Release,p)
221 /*** IFullScreenVideo methods ***/
222 #define IFullScreenVideo_CountModes(p,a1) ICOM_CALL1(CountModes,p,a1)
223 #define IFullScreenVideo_GetModeInfo(p,a1,a2,a3,a4) ICOM_CALL4(GetModeInfo,p,a1,a2,a3,a4)
224 #define IFullScreenVideo_GetCurrentMode(p,a1) ICOM_CALL1(GetCurrentMode,p,a1)
225 #define IFullScreenVideo_IsModeAvailable(p,a1) ICOM_CALL1(IsModeAvailable,p,a1)
226 #define IFullScreenVideo_IsModeEnabled(p,a1) ICOM_CALL1(IsModeEnabled,p,a1)
227 #define IFullScreenVideo_SetEnabled(p,a1,a2) ICOM_CALL2(SetEnabled,p,a1,a2)
228 #define IFullScreenVideo_GetClipFactor(p,a1) ICOM_CALL1(GetClipFactor,p,a1)
229 #define IFullScreenVideo_SetClipFactor(p,a1) ICOM_CALL1(SetClipFactor,p,a1)
230 #define IFullScreenVideo_SetMessageDrain(p,a1) ICOM_CALL1(SetMessageDrain,p,a1)
231 #define IFullScreenVideo_GetMessageDrain(p,a1) ICOM_CALL1(GetMessageDrain,p,a1)
232 #define IFullScreenVideo_SetMonitor(p,a1) ICOM_CALL1(SetMonitor,p,a1)
233 #define IFullScreenVideo_GetMonitor(p,a1) ICOM_CALL1(GetMonitor,p,a1)
234 #define IFullScreenVideo_HideOnDeactivate(p,a1) ICOM_CALL1(HideOnDeactivate,p,a1)
235 #define IFullScreenVideo_IsHideOnDeactivate(p) ICOM_CALL (IsHideOnDeactivate,p)
236 #define IFullScreenVideo_SetCaption(p,a1) ICOM_CALL1(SetCaption,p,a1)
237 #define IFullScreenVideo_GetCaption(p,a1) ICOM_CALL1(GetCaption,p,a1)
238 #define IFullScreenVideo_SetDefault(p) ICOM_CALL (SetDefault,p)
240 /**************************************************************************
242 * IFullScreenVideoEx interface
246 #define ICOM_INTERFACE IFullScreenVideoEx
247 #define IFullScreenVideoEx_METHODS \
248 ICOM_METHOD2(HRESULT,SetAcceleratorTable,HWND,a1,HACCEL,a2) \
249 ICOM_METHOD2(HRESULT,GetAcceleratorTable,HWND*,a1,HACCEL*,a2) \
250 ICOM_METHOD1(HRESULT,KeepPixelAspectRatio,long,a1) \
251 ICOM_METHOD1(HRESULT,IsKeepPixelAspectRatio,long*,a1)
253 #define IFullScreenVideoEx_IMETHODS \
254 IFullScreenVideo_IMETHODS \
255 IFullScreenVideoEx_METHODS
257 ICOM_DEFINE(IFullScreenVideoEx,IFullScreenVideo)
258 #undef ICOM_INTERFACE
260 /*** IUnknown methods ***/
261 #define IFullScreenVideoEx_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
262 #define IFullScreenVideoEx_AddRef(p) ICOM_CALL (AddRef,p)
263 #define IFullScreenVideoEx_Release(p) ICOM_CALL (Release,p)
264 /*** IFullScreenVideo methods ***/
265 #define IFullScreenVideoEx_CountModes(p,a1) ICOM_CALL1(CountModes,p,a1)
266 #define IFullScreenVideoEx_GetModeInfo(p,a1,a2,a3,a4) ICOM_CALL4(GetModeInfo,p,a1,a2,a3,a4)
267 #define IFullScreenVideoEx_GetCurrentMode(p,a1) ICOM_CALL1(GetCurrentMode,p,a1)
268 #define IFullScreenVideoEx_IsModeAvailable(p,a1) ICOM_CALL1(IsModeAvailable,p,a1)
269 #define IFullScreenVideoEx_IsModeEnabled(p,a1) ICOM_CALL1(IsModeEnabled,p,a1)
270 #define IFullScreenVideoEx_SetEnabled(p,a1,a2) ICOM_CALL2(SetEnabled,p,a1,a2)
271 #define IFullScreenVideoEx_GetClipFactor(p,a1) ICOM_CALL1(GetClipFactor,p,a1)
272 #define IFullScreenVideoEx_SetClipFactor(p,a1) ICOM_CALL1(SetClipFactor,p,a1)
273 #define IFullScreenVideoEx_SetMessageDrain(p,a1) ICOM_CALL1(SetMessageDrain,p,a1)
274 #define IFullScreenVideoEx_GetMessageDrain(p,a1) ICOM_CALL1(GetMessageDrain,p,a1)
275 #define IFullScreenVideoEx_SetMonitor(p,a1) ICOM_CALL1(SetMonitor,p,a1)
276 #define IFullScreenVideoEx_GetMonitor(p,a1) ICOM_CALL1(GetMonitor,p,a1)
277 #define IFullScreenVideoEx_HideOnDeactivate(p,a1) ICOM_CALL1(HideOnDeactivate,p,a1)
278 #define IFullScreenVideoEx_IsHideOnDeactivate(p) ICOM_CALL (IsHideOnDeactivate,p)
279 #define IFullScreenVideoEx_SetCaption(p,a1) ICOM_CALL1(SetCaption,p,a1)
280 #define IFullScreenVideoEx_GetCaption(p,a1) ICOM_CALL1(GetCaption,p,a1)
281 #define IFullScreenVideoEx_SetDefault(p) ICOM_CALL (SetDefault,p)
282 /*** IFullScreenVideoEx methods ***/
283 #define IFullScreenVideoEx_SetAcceleratorTable(p,a1,a2) ICOM_CALL2(SetAcceleratorTable,p,a1,a2)
284 #define IFullScreenVideoEx_GetAcceleratorTable(p,a1,a2) ICOM_CALL2(GetAcceleratorTable,p,a1,a2)
285 #define IFullScreenVideoEx_KeepPixelAspectRatio(p,a1) ICOM_CALL1(KeepPixelAspectRatio,p,a1)
286 #define IFullScreenVideoEx_IsKeepPixelAspectRatio(p,a1) ICOM_CALL1(IsKeepPixelAspectRatio,p,a1)
288 /**************************************************************************
290 * IQualProp interface
294 #define ICOM_INTERFACE IQualProp
295 #define IQualProp_METHODS \
296 ICOM_METHOD1(HRESULT,get_FramesDroppedInRenderer,int*,a1) \
297 ICOM_METHOD1(HRESULT,get_FramesDrawn,int*,a1) \
298 ICOM_METHOD1(HRESULT,get_AvgFrameRate,int*,a1) \
299 ICOM_METHOD1(HRESULT,get_Jitter,int*,a1) \
300 ICOM_METHOD1(HRESULT,get_AvgSyncOffset,int*,a1) \
301 ICOM_METHOD1(HRESULT,get_DevSyncOffset,int*,a1)
303 #define IQualProp_IMETHODS \
307 ICOM_DEFINE(IQualProp,IUnknown)
308 #undef ICOM_INTERFACE
310 /*** IUnknown methods ***/
311 #define IQualProp_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
312 #define IQualProp_AddRef(p) ICOM_CALL (AddRef,p)
313 #define IQualProp_Release(p) ICOM_CALL (Release,p)
314 /*** IQualProp methods ***/
315 #define IQualProp_get_FramesDroppedInRenderer(p,a1) ICOM_CALL1(get_FramesDroppedInRenderer,p,a1)
316 #define IQualProp_get_FramesDrawn(p,a1) ICOM_CALL1(get_FramesDrawn,p,a1)
317 #define IQualProp_get_AvgFrameRate(p,a1) ICOM_CALL1(get_AvgFrameRate,p,a1)
318 #define IQualProp_get_Jitter(p,a1) ICOM_CALL1(get_Jitter,p,a1)
319 #define IQualProp_get_AvgSyncOffset(p,a1) ICOM_CALL1(get_AvgSyncOffset,p,a1)
320 #define IQualProp_get_DevSyncOffset(p,a1) ICOM_CALL1(get_DevSyncOffset,p,a1)
323 #endif /* __WINE_AMVIDEO_H_ */