4 * COPYRIGHT: This file is in the public domain.
5 * PROJECT: ReactOS kernel
7 * PURPOSE: Directx headers
8 * PROGRAMMER: Magnus Olsen (greatlrd)
12 #ifndef __DVP_INCLUDED__
13 #define __DVP_INCLUDED__
15 #if defined( _WIN32 ) && !defined( _NO_COM )
16 DEFINE_GUID( IID_IDDVideoPortContainer
, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
17 DEFINE_GUID( IID_IDirectDrawVideoPort
, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
18 DEFINE_GUID( IID_IDirectDrawVideoPortNotify
, 0xA655FB94,0x0589,0x4E57,0xB3,0x33,0x56,0x7A,0x89,0x46,0x8C,0x88);
20 DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH
, 0x54F39980L
,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
21 DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL
, 0x92783220L
,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
22 DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH
, 0xA07A02E0L
,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
23 DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL
, 0xE09C77E0L
,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
24 DEFINE_GUID( DDVPTYPE_CCIR656
, 0xFCA326A0L
,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
25 DEFINE_GUID( DDVPTYPE_BROOKTREE
, 0x1352A560L
,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
26 DEFINE_GUID( DDVPTYPE_PHILIPS
, 0x332CF160L
,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
29 #ifndef GUID_DEFS_ONLY
30 #if defined( _WIN32 ) && !defined( _NO_COM )
31 #define COM_NO_WINDOWS_H
38 #define ULONG_PTR DWORD
45 typedef struct _DDVIDEOPORTCONNECT
51 ULONG_PTR dwReserved1
;
52 } DDVIDEOPORTCONNECT
, *LPDDVIDEOPORTCONNECT
;
54 typedef struct _DDVIDEOPORTDESC
60 DWORD dwMicrosecondsPerField
;
61 DWORD dwMaxPixelsPerSecond
;
64 DDVIDEOPORTCONNECT VideoPortType
;
65 ULONG_PTR dwReserved2
;
66 ULONG_PTR dwReserved3
;
67 } DDVIDEOPORTDESC
, *LPDDVIDEOPORTDESC
;
69 typedef struct _DDVIDEOPORTBANDWIDTH
75 DWORD dwYInterpAndColorkey
;
76 ULONG_PTR dwReserved1
;
77 ULONG_PTR dwReserved2
;
78 } DDVIDEOPORTBANDWIDTH
, *LPDDVIDEOPORTBANDWIDTH
;
80 typedef struct _DDVIDEOPORTCAPS
90 DWORD dwNumAutoFlipSurfaces
;
91 DWORD dwAlignVideoPortBoundary
;
92 DWORD dwAlignVideoPortPrescaleWidth
;
93 DWORD dwAlignVideoPortCropBoundary
;
94 DWORD dwAlignVideoPortCropWidth
;
95 DWORD dwPreshrinkXStep
;
96 DWORD dwPreshrinkYStep
;
97 DWORD dwNumVBIAutoFlipSurfaces
;
98 DWORD dwNumPreferredAutoflip
;
100 WORD wNumFilterTapsY
;
101 } DDVIDEOPORTCAPS
, *LPDDVIDEOPORTCAPS
;
103 typedef struct _DDVIDEOPORTINFO
110 DWORD dwPrescaleWidth
;
111 DWORD dwPrescaleHeight
;
112 LPDDPIXELFORMAT lpddpfInputFormat
;
113 LPDDPIXELFORMAT lpddpfVBIInputFormat
;
114 LPDDPIXELFORMAT lpddpfVBIOutputFormat
;
116 ULONG_PTR dwReserved1
;
117 ULONG_PTR dwReserved2
;
118 } DDVIDEOPORTINFO
, *LPDDVIDEOPORTINFO
;
120 typedef struct _DDVIDEOPORTSTATUS
126 DDVIDEOPORTCONNECT VideoPortType
;
127 ULONG_PTR dwReserved2
;
128 ULONG_PTR dwReserved3
;
129 } DDVIDEOPORTSTATUS
, *LPDDVIDEOPORTSTATUS
;
131 typedef struct _DDVIDEOPORTNOTIFY
133 LARGE_INTEGER ApproximateTimeStamp
;
137 } DDVIDEOPORTNOTIFY
, *LPDDVIDEOPORTNOTIFY
;
140 #define DDVPD_WIDTH 0x00000001
141 #define DDVPD_HEIGHT 0x00000002
142 #define DDVPD_ID 0x00000004
143 #define DDVPD_CAPS 0x00000008
144 #define DDVPD_FX 0x00000010
145 #define DDVPD_AUTOFLIP 0x00000020
146 #define DDVPD_ALIGN 0x00000040
147 #define DDVPD_PREFERREDAUTOFLIP 0x00000080
148 #define DDVPD_FILTERQUALITY 0x00000100
149 #define DDVPCONNECT_DOUBLECLOCK 0x00000001
150 #define DDVPCONNECT_VACT 0x00000002
151 #define DDVPCONNECT_INVERTPOLARITY 0x00000004
152 #define DDVPCONNECT_DISCARDSVREFDATA 0x00000008
153 #define DDVPCONNECT_HALFLINE 0x00000010
154 #define DDVPCONNECT_INTERLACED 0x00000020
155 #define DDVPCONNECT_SHAREEVEN 0x00000040
156 #define DDVPCONNECT_SHAREODD 0x00000080
157 #define DDVPCAPS_AUTOFLIP 0x00000001
158 #define DDVPCAPS_INTERLACED 0x00000002
159 #define DDVPCAPS_NONINTERLACED 0x00000004
160 #define DDVPCAPS_READBACKFIELD 0x00000008
161 #define DDVPCAPS_READBACKLINE 0x00000010
162 #define DDVPCAPS_SHAREABLE 0x00000020
163 #define DDVPCAPS_SKIPEVENFIELDS 0x00000040
164 #define DDVPCAPS_SKIPODDFIELDS 0x00000080
165 #define DDVPCAPS_SYNCMASTER 0x00000100
166 #define DDVPCAPS_VBISURFACE 0x00000200
167 #define DDVPCAPS_COLORCONTROL 0x00000400
168 #define DDVPCAPS_OVERSAMPLEDVBI 0x00000800
169 #define DDVPCAPS_SYSTEMMEMORY 0x00001000
170 #define DDVPCAPS_VBIANDVIDEOINDEPENDENT 0x00002000
171 #define DDVPCAPS_HARDWAREDEINTERLACE 0x00004000
172 #define DDVPFX_CROPTOPDATA 0x00000001
173 #define DDVPFX_CROPX 0x00000002
174 #define DDVPFX_CROPY 0x00000004
175 #define DDVPFX_INTERLEAVE 0x00000008
176 #define DDVPFX_MIRRORLEFTRIGHT 0x00000010
177 #define DDVPFX_MIRRORUPDOWN 0x00000020
178 #define DDVPFX_PRESHRINKX 0x00000040
179 #define DDVPFX_PRESHRINKY 0x00000080
180 #define DDVPFX_PRESHRINKXB 0x00000100
181 #define DDVPFX_PRESHRINKYB 0x00000200
182 #define DDVPFX_PRESHRINKXS 0x00000400
183 #define DDVPFX_PRESHRINKYS 0x00000800
184 #define DDVPFX_PRESTRETCHX 0x00001000
185 #define DDVPFX_PRESTRETCHY 0x00002000
186 #define DDVPFX_PRESTRETCHXN 0x00004000
187 #define DDVPFX_PRESTRETCHYN 0x00008000
188 #define DDVPFX_VBICONVERT 0x00010000
189 #define DDVPFX_VBINOSCALE 0x00020000
190 #define DDVPFX_IGNOREVBIXCROP 0x00040000
191 #define DDVPFX_VBINOINTERLEAVE 0x00080000
192 #define DDVP_AUTOFLIP 0x00000001
193 #define DDVP_CONVERT 0x00000002
194 #define DDVP_CROP 0x00000004
195 #define DDVP_INTERLEAVE 0x00000008
196 #define DDVP_MIRRORLEFTRIGHT 0x00000010
197 #define DDVP_MIRRORUPDOWN 0x00000020
198 #define DDVP_PRESCALE 0x00000040
199 #define DDVP_SKIPEVENFIELDS 0x00000080
200 #define DDVP_SKIPODDFIELDS 0x00000100
201 #define DDVP_SYNCMASTER 0x00000200
202 #define DDVP_VBICONVERT 0x00000400
203 #define DDVP_VBINOSCALE 0x00000800
204 #define DDVP_OVERRIDEBOBWEAVE 0x00001000
205 #define DDVP_IGNOREVBIXCROP 0x00002000
206 #define DDVP_VBINOINTERLEAVE 0x00004000
207 #define DDVP_HARDWAREDEINTERLACE 0x00008000
208 #define DDVPFORMAT_VIDEO 0x00000001
209 #define DDVPFORMAT_VBI 0x00000002
210 #define DDVPTARGET_VIDEO 0x00000001
211 #define DDVPTARGET_VBI 0x00000002
212 #define DDVPWAIT_BEGIN 0x00000001
213 #define DDVPWAIT_END 0x00000002
214 #define DDVPWAIT_LINE 0x00000003
215 #define DDVPFLIP_VIDEO 0x00000001
216 #define DDVPFLIP_VBI 0x00000002
217 #define DDVPSQ_NOSIGNAL 0x00000001
218 #define DDVPSQ_SIGNALOK 0x00000002
219 #define DDVPB_VIDEOPORT 0x00000001
220 #define DDVPB_OVERLAY 0x00000002
221 #define DDVPB_TYPE 0x00000004
222 #define DDVPBCAPS_SOURCE 0x00000001
223 #define DDVPBCAPS_DESTINATION 0x00000002
224 #define DDVPCREATE_VBIONLY 0x00000001
225 #define DDVPCREATE_VIDEOONLY 0x00000002
226 #define DDVPSTATUS_VBIONLY 0x00000001
227 #define DDVPSTATUS_VIDEOONLY 0x00000002
230 struct IDirectDrawSurface
;
231 struct IDirectDrawPalette
;
232 struct IDirectDrawClipper
;
233 typedef struct IDirectDrawVideoPort
*LPDIRECTDRAWVIDEOPORT
;
234 typedef struct IDDVideoPortContainer
*LPDDVIDEOPORTCONTAINER
;
235 typedef struct IDirectDrawVideoPortNotify
*LPDIRECTDRAWVIDEOPORTNOTIFY
;
237 typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS
;
238 typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS
;
239 typedef struct IDirectDrawVideoPortNotifyVtbl DIRECTDRAWVIDEOPORTNOTIFYCALLBACKS
;
241 typedef HRESULT (*LPDDENUMVIDEOCALLBACK
)(LPDDVIDEOPORTCAPS
, LPVOID
);
245 #if defined( _WIN32 ) && !defined( _NO_COM )
247 #define INTERFACE IDDVideoPortContainer
248 DECLARE_INTERFACE_( IDDVideoPortContainer
, IUnknown
)
250 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
*ppvObj
) PURE
;
251 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
252 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
253 STDMETHOD(CreateVideoPort
)(THIS_ DWORD
, LPDDVIDEOPORTDESC
, LPDIRECTDRAWVIDEOPORT
*, IUnknown
*) PURE
;
254 STDMETHOD(EnumVideoPorts
)(THIS_ DWORD
, LPDDVIDEOPORTCAPS
, LPVOID
,LPDDENUMVIDEOCALLBACK
) PURE
;
255 STDMETHOD(GetVideoPortConnectInfo
)(THIS_ DWORD
, LPDWORD
, LPDDVIDEOPORTCONNECT
) PURE
;
256 STDMETHOD(QueryVideoPortStatus
)(THIS_ DWORD
, LPDDVIDEOPORTSTATUS
) PURE
;
259 #if !defined(__cplusplus) || defined(CINTERFACE)
260 #define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
261 #define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
262 #define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p)
263 #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
264 #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
265 #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
266 #define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
268 #define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
269 #define IVideoPortContainer_AddRef(p) (p)->AddRef()
270 #define IVideoPortContainer_Release(p) (p)->Release()
271 #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d)
272 #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d)
273 #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
274 #define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b)
278 #if defined( _WIN32 ) && !defined( _NO_COM )
280 #define INTERFACE IDirectDrawVideoPort
281 DECLARE_INTERFACE_( IDirectDrawVideoPort
, IUnknown
)
283 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
284 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
285 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
286 STDMETHOD(Flip
)(THIS_ LPDIRECTDRAWSURFACE
, DWORD
) PURE
;
287 STDMETHOD(GetBandwidthInfo
)(THIS_ LPDDPIXELFORMAT
, DWORD
, DWORD
, DWORD
, LPDDVIDEOPORTBANDWIDTH
) PURE
;
288 STDMETHOD(GetColorControls
)(THIS_ LPDDCOLORCONTROL
) PURE
;
289 STDMETHOD(GetInputFormats
)(THIS_ LPDWORD
, LPDDPIXELFORMAT
, DWORD
) PURE
;
290 STDMETHOD(GetOutputFormats
)(THIS_ LPDDPIXELFORMAT
, LPDWORD
, LPDDPIXELFORMAT
, DWORD
) PURE
;
291 STDMETHOD(GetFieldPolarity
)(THIS_ LPBOOL
) PURE
;
292 STDMETHOD(GetVideoLine
)(THIS_ LPDWORD
) PURE
;
293 STDMETHOD(GetVideoSignalStatus
)(THIS_ LPDWORD
) PURE
;
294 STDMETHOD(SetColorControls
)(THIS_ LPDDCOLORCONTROL
) PURE
;
295 STDMETHOD(SetTargetSurface
)(THIS_ LPDIRECTDRAWSURFACE
, DWORD
) PURE
;
296 STDMETHOD(StartVideo
)(THIS_ LPDDVIDEOPORTINFO
) PURE
;
297 STDMETHOD(StopVideo
)(THIS
) PURE
;
298 STDMETHOD(UpdateVideo
)(THIS_ LPDDVIDEOPORTINFO
) PURE
;
299 STDMETHOD(WaitForSync
)(THIS_ DWORD
, DWORD
, DWORD
) PURE
;
302 #if !defined(__cplusplus) || defined(CINTERFACE)
303 #define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
304 #define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p)
305 #define IVideoPort_Release(p) (p)->lpVtbl->Release(p)
306 #define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b)
307 #define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
308 #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
309 #define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
310 #define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c)
311 #define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
312 #define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a)
313 #define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a)
314 #define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a)
315 #define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
316 #define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a)
317 #define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p)
318 #define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a)
319 #define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c)
321 #define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
322 #define IVideoPort_AddRef(p) (p)->AddRef()
323 #define IVideoPort_Release(p) (p)->Release()
324 #define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b)
325 #define IVideoPort_Flip(p,a,b) (p)->Flip(a,b)
326 #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
327 #define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a)
328 #define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c)
329 #define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d)
330 #define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a)
331 #define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a)
332 #define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a)
333 #define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a)
334 #define IVideoPort_StartVideo(p,a) (p)->StartVideo(a)
335 #define IVideoPort_StopVideo(p) (p)->StopVideo()
336 #define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a)
337 #define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c)
341 #if defined( _WIN32 ) && !defined( _NO_COM )
343 #define INTERFACE IDirectDrawVideoPortNotify
345 DECLARE_INTERFACE_( IDirectDrawVideoPortNotify
, IUnknown
)
347 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
348 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
349 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
350 STDMETHOD(AcquireNotification
)(THIS_ HANDLE
*, LPDDVIDEOPORTNOTIFY
) PURE
;
351 STDMETHOD(ReleaseNotification
)(THIS_ HANDLE
) PURE
;
354 #if !defined(__cplusplus) || defined(CINTERFACE)
355 #define IVideoPortNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
356 #define IVideoPortNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
357 #define IVideoPortNotify_Release(p) (p)->lpVtbl->Release(p)
358 #define IVideoPortNotify_AcquireNotification(p,a,b) (p)->lpVtbl->AcquireNotification(p,a,b)
359 #define IVideoPortNotify_ReleaseNotification(p,a) (p)->lpVtbl->ReleaseNotification(p,a)
361 #define IVideoPortNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
362 #define IVideoPortNotify_AddRef(p) (p)->AddRef()
363 #define IVideoPortNotify_Release(p) (p)->Release()
364 #define IVideoPortNotify_AcquireNotification(p,a,b) (p)->lpVtbl->AcquireNotification(a,b)
365 #define IVideoPortNotify_ReleaseNotification(p,a) (p)->lpVtbl->ReleaseNotification(a)