FS2_Open
Open source remastering of the Freespace 2 engine
vdvp.h
Go to the documentation of this file.
1 /*==========================================================================;
2  *
3  * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
4  *
5  * File: dvp.h
6  * Content: DirectDrawVideoPort include file
7  *
8  ***************************************************************************/
9 
10 
11 #ifndef __DVP_INCLUDED__
12 #define __DVP_INCLUDED__
13 #if defined( _WIN32 ) && !defined( _NO_COM )
14 #define COM_NO_WINDOWS_H
15 #include <objbase.h>
16 #else
17 #define IUnknown void
18 #undef CO_E_NOTINITIALIZED
19 #define CO_E_NOTINITIALIZED 0x800401F0L
20 #endif
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /*
27  * GUIDS used by DirectDrawVideoPort objects
28  */
29 #if defined( _WIN32 ) && !defined( _NO_COM )
30 DEFINE_GUID( IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
31 DEFINE_GUID( IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
32 
33 DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
34 DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
35 DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
36 DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
37 DEFINE_GUID( DDVPTYPE_CCIR656, 0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
38 DEFINE_GUID( DDVPTYPE_BROOKTREE, 0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
39 DEFINE_GUID( DDVPTYPE_PHILIPS, 0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
40 
41 /*
42  * GUIDS used to describe connections
43  */
44 
45 #endif
46 
47 /*============================================================================
48  *
49  * DirectDraw Structures
50  *
51  * Various structures used to invoke DirectDraw.
52  *
53  *==========================================================================*/
54 
55 struct IDirectDraw;
56 struct IDirectDrawSurface;
57 struct IDirectDrawPalette;
58 struct IDirectDrawClipper;
59 
60 typedef struct IDDVideoPortContainer FAR *LPDDVIDEOPORTCONTAINER;
61 typedef struct IDirectDrawVideoPort FAR *LPDIRECTDRAWVIDEOPORT;
62 
69 
70 typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
71 typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS;
72 
73 
74 /*
75  * API's
76  */
77 typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
78 
79 
80 /*
81  * INTERACES FOLLOW:
82  * IDirectDrawVideoPort
83  * IVideoPort
84  */
85 
86 /*
87  * IDirectDrawVideoPortContainer
88  */
89 #if defined( _WIN32 ) && !defined( _NO_COM )
90 #undef INTERFACE
91 #define INTERFACE IDDVideoPortContainer
92 DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
93 {
94  /*** IUnknown methods ***/
95  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
96  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
97  STDMETHOD_(ULONG,Release) (THIS) PURE;
98  /*** IDirectDrawVideoPort methods ***/
99  STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
100  STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
101  STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
102  STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
103 };
104 
105 #if !defined(__cplusplus) || defined(CINTERFACE)
106 #define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
107 #define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
108 #define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p)
109 #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
110 #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
111 #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
112 #define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
113 #else
114 #define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
115 #define IVideoPortContainer_AddRef(p) (p)->AddRef()
116 #define IVideoPortContainer_Release(p) (p)->Release()
117 #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d)
118 #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d)
119 #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
120 #define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b)
121 #endif
122 
123 #endif
124 
125 
126 /*
127  * IDirectDrawVideoPort
128  */
129 #if defined( _WIN32 ) && !defined( _NO_COM )
130 #undef INTERFACE
131 #define INTERFACE IDirectDrawVideoPort
132 DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
133 {
134  /*** IUnknown methods ***/
135  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
136  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
137  STDMETHOD_(ULONG,Release) (THIS) PURE;
138  /*** IVideoPort methods ***/
139  STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
140  STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
141  STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
142  STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
143  STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
144  STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
145  STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
146  STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
147  STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
148  STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
149  STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
150  STDMETHOD(StopVideo)(THIS) PURE;
151  STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
152  STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
153 };
154 
155 #if !defined(__cplusplus) || defined(CINTERFACE)
156 #define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
157 #define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p)
158 #define IVideoPort_Release(p) (p)->lpVtbl->Release(p)
159 #define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b)
160 #define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
161 #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
162 #define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
163 #define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c)
164 #define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
165 #define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a)
166 #define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a)
167 #define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a)
168 #define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
169 #define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a)
170 #define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p)
171 #define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a)
172 #define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c)
173 #else
174 #define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
175 #define IVideoPort_AddRef(p) (p)->AddRef()
176 #define IVideoPort_Release(p) (p)->Release()
177 #define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b)
178 #define IVideoPort_Flip(p,a,b) (p)->Flip(a,b)
179 #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
180 #define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a)
181 #define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c)
182 #define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d)
183 #define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a)
184 #define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a)
185 #define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a)
186 #define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a)
187 #define IVideoPort_StartVideo(p,a) (p)->StartVideo(a)
188 #define IVideoPort_StopVideo(p) (p)->StopVideo()
189 #define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a)
190 #define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c)
191 #endif
192 
193 #endif
194 
195 
196 /*
197  * DDVIDEOPORTCONNECT
198  */
199 typedef struct _DDVIDEOPORTCONNECT
200 {
201  DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
202  DWORD dwPortWidth; // Width of the video port
203  GUID guidTypeID; // Description of video port connection
204  DWORD dwFlags; // Connection flags
205  DWORD dwReserved1; // Reserved, set to zero.
207 
208 
209 /*
210  * DDVIDEOPORTCAPS
211  */
212 typedef struct _DDVIDEOPORTCAPS
213 {
214  DWORD dwSize; // size of the DDVIDEOPORTCAPS structure
215  DWORD dwFlags; // indicates which fields contain data
216  DWORD dwMaxWidth; // max width of the video port field
217  DWORD dwMaxVBIWidth; // max width of the VBI data
218  DWORD dwMaxHeight; // max height of the video port field
219  DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
220  DWORD dwCaps; // Video port capabilities
221  DWORD dwFX; // More video port capabilities
222  DWORD dwNumAutoFlipSurfaces; // Number of autoflippable surfaces
223  DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface
224  DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
225  DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping
226  DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width
227  DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x
228  DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x
229  DWORD dwNumVBIAutoFlipSurfaces; // Number of VBI autoflippable surfaces
230  DWORD dwReserved1; // Reserved for future use
231  DWORD dwReserved2; // Reserved for future use
233 
234 /*
235  * The dwMaxWidth and dwMaxVBIWidth members are valid
236  */
237 #define DDVPD_WIDTH 0x00000001l
238 
239 /*
240  * The dwMaxHeight member is valid
241  */
242 #define DDVPD_HEIGHT 0x00000002l
243 
244 /*
245  * The dwVideoPortID member is valid
246  */
247 #define DDVPD_ID 0x00000004l
248 
249 /*
250  * The dwCaps member is valid
251  */
252 #define DDVPD_CAPS 0x00000008l
253 
254 /*
255  * The dwFX member is valid
256  */
257 #define DDVPD_FX 0x00000010l
258 
259 /*
260  * The dwNumAutoFlipSurfaces member is valid
261  */
262 #define DDVPD_AUTOFLIP 0x00000020l
263 
264 /*
265  * All of the alignment members are valid
266  */
267 #define DDVPD_ALIGN 0x00000040l
268 
269 
270 /*
271  * DDVIDEOPORTDESC
272  */
273 typedef struct _DDVIDEOPORTDESC
274 {
275  DWORD dwSize; // size of the DDVIDEOPORTDESC structure
276  DWORD dwFieldWidth; // width of the video port field
277  DWORD dwVBIWidth; // width of the VBI data
278  DWORD dwFieldHeight; // height of the video port field
279  DWORD dwMicrosecondsPerField; // Microseconds per video field
280  DWORD dwMaxPixelsPerSecond; // Maximum pixel rate per second
281  DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
282  DWORD dwReserved1; // Reserved for future use - set to zero
283  DDVIDEOPORTCONNECT VideoPortType; // Description of video port connection
284  DWORD dwReserved2; // Reserved for future use - set to zero
285  DWORD dwReserved3; // Reserved for future use - set to zero
287 
288 
289 /*
290  * DDVIDEOPORTINFO
291  */
292 typedef struct _DDVIDEOPORTINFO
293 {
294  DWORD dwSize; // Size of the structure
295  DWORD dwOriginX; // Placement of the video data within the surface.
296  DWORD dwOriginY; // Placement of the video data within the surface.
297  DWORD dwVPFlags; // Video port options
298  RECT rCrop; // Cropping rectangle (optional).
299  DWORD dwPrescaleWidth; // Determines pre-scaling/zooming in the X direction (optional).
300  DWORD dwPrescaleHeight; // Determines pre-scaling/zooming in the Y direction (optional).
301  LPDDPIXELFORMAT lpddpfInputFormat; // Video format written to the video port
302  LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
303  LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
304  DWORD dwVBIHeight; // Specifies the number of lines of data within the vertical blanking interval.
305  DWORD dwReserved1; // Reserved for future use - set to zero
306  DWORD dwReserved2; // Reserved for future use - set to zero
308 
309 
310 /*
311  * DDVIDEOPORTBANDWIDTH
312  */
313 typedef struct _DDVIDEOPORTBANDWIDTH
314 {
315  DWORD dwSize; // Size of the structure
317  DWORD dwOverlay; // Zoom factor at which overlay is supported
318  DWORD dwColorkey; // Zoom factor at which overlay w/ colorkey is supported
319  DWORD dwYInterpolate; // Zoom factor at which overlay w/ Y interpolation is supported
320  DWORD dwYInterpAndColorkey; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
321  DWORD dwReserved1; // Reserved for future use - set to zero
322  DWORD dwReserved2; // Reserved for future use - set to zero
324 
325 
326 /*
327  * DDVIDEOPORTSTATUS
328  */
329 typedef struct _DDVIDEOPORTSTATUS
330 {
331  DWORD dwSize; // Size of the structure
332  BOOL bInUse; // TRUE if video port is currently being used
333  DWORD dwFlags; // Currently not used
334  DWORD dwReserved1; // Reserved for future use
335  DDVIDEOPORTCONNECT VideoPortType; // Information about the connection
336  DWORD dwReserved2; // Reserved for future use
337  DWORD dwReserved3; // Reserved for future use
339 
340 /*============================================================================
341  *
342  * Video Port Flags
343  *
344  * All flags are bit flags.
345  *
346  *==========================================================================*/
347 
348 /****************************************************************************
349  *
350  * VIDEOPORT DDVIDEOPORTCONNECT FLAGS
351  *
352  ****************************************************************************/
353 
354 /*
355  * When this is set by the driver and passed to the client, this
356  * indicates that the video port is capable of double clocking the data.
357  * When this is set by the client, this indicates that the video port
358  * should enable double clocking. This flag is only valid with external
359  * syncs.
360  */
361 #define DDVPCONNECT_DOUBLECLOCK 0x00000001l
362 
363 /*
364  * When this is set by the driver and passed to the client, this
365  * indicates that the video port is capable of using an external VACT
366  * signal. When this is set by the client, this indicates that the
367  * video port should use the external VACT signal.
368  */
369 #define DDVPCONNECT_VACT 0x00000002l
370 
371 /*
372  * When this is set by the driver and passed to the client, this
373  * indicates that the video port is capable of treating even fields
374  * like odd fields and visa versa. When this is set by the client,
375  * this indicates that the video port should treat even fields like odd
376  * fields.
377  */
378 #define DDVPCONNECT_INVERTPOLARITY 0x00000004l
379 
380 /*
381  * Indicates that any data written to the video port during the VREF
382  * period will not be written into the frame buffer. This flag is read only.
383  */
384 #define DDVPCONNECT_DISCARDSVREFDATA 0x00000008l
385 
386 /*
387  * Device will write half lines into the frame buffer, sometimes causing
388  * the data to not be displayed correctly.
389  */
390 #define DDVPCONNECT_HALFLINE 0x00000010l
391 
392 /*
393  * Indicates that the signal is interlaced. This flag is only
394  * set by the client.
395  */
396 #define DDVPCONNECT_INTERLACED 0x00000020l
397 
398 /*
399  * Indicates that video port is shareable and that this video port
400  * will use the even fields. This flag is only set by the client.
401  */
402 #define DDVPCONNECT_SHAREEVEN 0x00000040l
403 
404 /*
405  * Indicates that video port is shareable and that this video port
406  * will use the odd fields. This flag is only set by the client.
407  */
408 #define DDVPCONNECT_SHAREODD 0x00000080l
409 
410 /****************************************************************************
411  *
412  * VIDEOPORT DDVIDEOPORTDESC CAPS
413  *
414  ****************************************************************************/
415 
416 /*
417  * Flip can be performed automatically to avoid tearing.
418  */
419 #define DDVPCAPS_AUTOFLIP 0x00000001l
420 
421 /*
422  * Supports interlaced video
423  */
424 #define DDVPCAPS_INTERLACED 0x00000002l
425 
426 /*
427  * Supports non-interlaced video
428  */
429 #define DDVPCAPS_NONINTERLACED 0x00000004l
430 
431 /*
432  * Indicates that the device can return whether the current field
433  * of an interlaced signal is even or odd.
434  */
435 #define DDVPCAPS_READBACKFIELD 0x00000008l
436 
437 /*
438  * Indicates that the device can return the current line of video
439  * being written into the frame buffer.
440  */
441 #define DDVPCAPS_READBACKLINE 0x00000010l
442 
443 /*
444  * Allows two gen-locked video streams to share a single video port,
445  * where one stream uses the even fields and the other uses the odd
446  * fields. Separate parameters (including address, scaling,
447  * cropping, etc.) are maintained for both fields.)
448  */
449 #define DDVPCAPS_SHAREABLE 0x00000020l
450 
451 /*
452  * Even fields of video can be automatically discarded.
453  */
454 #define DDVPCAPS_SKIPEVENFIELDS 0x00000040l
455 
456 /*
457  * Odd fields of video can be automatically discarded.
458  */
459 #define DDVPCAPS_SKIPODDFIELDS 0x00000080l
460 
461 /*
462  * Indicates that the device is capable of driving the graphics
463  * VSYNC with the video port VSYNC.
464  */
465 #define DDVPCAPS_SYNCMASTER 0x00000100l
466 
467 /*
468  * Indicates that data within the vertical blanking interval can
469  * be written to a different surface.
470  */
471 #define DDVPCAPS_VBISURFACE 0x00000200l
472 
473 /*
474  * Indicates that the video port can perform color operations
475  * on the incoming data before it is written to the frame buffer.
476  */
477 #define DDVPCAPS_COLORCONTROL 0x00000400l
478 
479 /*
480  * Indicates that the video port can accept VBI data in a different
481  * width or format than the regular video data.
482  */
483 #define DDVPCAPS_OVERSAMPLEDVBI 0x00000800l
484 
485 /*
486  * Indicates that the video port can write data directly to system memory
487  */
488 #define DDVPCAPS_SYSTEMMEMORY 0x00001000l
489 
490 
491 /****************************************************************************
492  *
493  * VIDEOPORT DDVIDEOPORTDESC FX
494  *
495  ****************************************************************************/
496 
497 /*
498  * Limited cropping is available to crop out the vertical interval data.
499  */
500 #define DDVPFX_CROPTOPDATA 0x00000001l
501 
502 /*
503  * Incoming data can be cropped in the X direction before it is written
504  * to the surface.
505  */
506 #define DDVPFX_CROPX 0x00000002l
507 
508 /*
509  * Incoming data can be cropped in the Y direction before it is written
510  * to the surface.
511  */
512 #define DDVPFX_CROPY 0x00000004l
513 
514 /*
515  * Supports interleaving interlaced fields in memory.
516  */
517 #define DDVPFX_INTERLEAVE 0x00000008l
518 
519 /*
520  * Supports mirroring left to right as the video data is written
521  * into the frame buffer.
522  */
523 #define DDVPFX_MIRRORLEFTRIGHT 0x00000010l
524 
525 /*
526  * Supports mirroring top to bottom as the video data is written
527  * into the frame buffer.
528  */
529 #define DDVPFX_MIRRORUPDOWN 0x00000020l
530 
531 /*
532  * Data can be arbitrarily shrunk in the X direction before it
533  * is written to the surface.
534  */
535 #define DDVPFX_PRESHRINKX 0x00000040l
536 
537 /*
538  * Data can be arbitrarily shrunk in the Y direction before it
539  * is written to the surface.
540  */
541 #define DDVPFX_PRESHRINKY 0x00000080l
542 
543 /*
544  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
545  * direction before it is written to the surface.
546  */
547 #define DDVPFX_PRESHRINKXB 0x00000100l
548 
549 /*
550  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
551  * direction before it is written to the surface.
552  */
553 #define DDVPFX_PRESHRINKYB 0x00000200l
554 
555 /*
556  * Data can be shrunk in increments of 1/x in the X direction
557  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
558  * before it is written to the surface.
559  */
560 #define DDVPFX_PRESHRINKXS 0x00000400l
561 
562 /*
563  * Data can be shrunk in increments of 1/x in the Y direction
564  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
565  * before it is written to the surface.
566  */
567 #define DDVPFX_PRESHRINKYS 0x00000800l
568 
569 /*
570  * Data can be arbitrarily stretched in the X direction before
571  * it is written to the surface.
572  */
573 #define DDVPFX_PRESTRETCHX 0x00001000l
574 
575 /*
576  * Data can be arbitrarily stretched in the Y direction before
577  * it is written to the surface.
578  */
579 #define DDVPFX_PRESTRETCHY 0x00002000l
580 
581 /*
582  * Data can be integer stretched in the X direction before it is
583  * written to the surface.
584  */
585 #define DDVPFX_PRESTRETCHXN 0x00004000l
586 
587 /*
588  * Data can be integer stretched in the Y direction before it is
589  * written to the surface.
590  */
591 #define DDVPFX_PRESTRETCHYN 0x00008000l
592 
593 /*
594  * Indicates that data within the vertical blanking interval can
595  * be converted independently of the remaining video data.
596  */
597 #define DDVPFX_VBICONVERT 0x00010000l
598 
599 /*
600  * Indicates that scaling can be disabled for data within the
601  * vertical blanking interval.
602  */
603 #define DDVPFX_VBINOSCALE 0x00020000l
604 
605 /*
606  * Indicates that the video data can ignore the left and right
607  * cropping coordinates when cropping oversampled VBI data.
608  */
609 #define DDVPFX_IGNOREVBIXCROP 0x00040000l
610 
611 
612 /****************************************************************************
613  *
614  * VIDEOPORT DDVIDEOPORTINFO FLAGS
615  *
616  ****************************************************************************/
617 
618 /*
619  * Perform automatic flipping. Auto-flipping is performed between
620  * the overlay surface that was attached to the video port using
621  * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
622  * are attached to the surface via the IDirectDrawSurface::AttachSurface
623  * method. The flip order is the order in which the overlay surfaces
624  * were. attached.
625  */
626 #define DDVP_AUTOFLIP 0x00000001l
627 
628 /*
629  * Perform conversion using the ddpfOutputFormat information.
630  */
631 #define DDVP_CONVERT 0x00000002l
632 
633 /*
634  * Perform cropping using the specified rectangle.
635  */
636 #define DDVP_CROP 0x00000004l
637 
638 /*
639  * Indicates that interlaced fields should be interleaved in memory.
640  */
641 #define DDVP_INTERLEAVE 0x00000008l
642 
643 /*
644  * Indicates that the data should be mirrored left to right as it's
645  * written into the frame buffer.
646  */
647 #define DDVP_MIRRORLEFTRIGHT 0x00000010l
648 
649 /*
650  * Indicates that the data should be mirrored top to bottom as it's
651  * written into the frame buffer.
652  */
653 #define DDVP_MIRRORUPDOWN 0x00000020l
654 
655 /*
656  * Perform pre-scaling/zooming based on the pre-scale parameters.
657  */
658 #define DDVP_PRESCALE 0x00000040l
659 
660 /*
661  * Ignore input of even fields.
662  */
663 #define DDVP_SKIPEVENFIELDS 0x00000080l
664 
665 /*
666  * Ignore input of odd fields.
667  */
668 #define DDVP_SKIPODDFIELDS 0x00000100l
669 
670 /*
671  * Drive the graphics VSYNCs using the video port VYSNCs.
672  */
673 #define DDVP_SYNCMASTER 0x00000200l
674 
675 /*
676  * The ddpfVBIOutputFormatFormat member contains data that should be used
677  * to convert the data within the vertical blanking interval.
678  */
679 #define DDVP_VBICONVERT 0x00000400l
680 
681 /*
682  * Indicates that data within the vertical blanking interval
683  * should not be scaled.
684  */
685 #define DDVP_VBINOSCALE 0x00000800l
686 
687 /*
688  * Indicates that these bob/weave decisions should not be
689  * overriden by other interfaces.
690  */
691 #define DDVP_OVERRIDEBOBWEAVE 0x00001000l
692 
693 /*
694  * Indicates that the video data should ignore the left and right
695  * cropping coordinates when cropping the VBI data.
696  */
697 #define DDVP_IGNOREVBIXCROP 0x00002000l
698 
699 
700 /****************************************************************************
701  *
702  * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
703  *
704  ****************************************************************************/
705 
706 /*
707  * Return formats for the video data
708  */
709 #define DDVPFORMAT_VIDEO 0x00000001l
710 
711 /*
712  * Return formats for the VBI data
713  */
714 #define DDVPFORMAT_VBI 0x00000002l
715 
716 
717 /****************************************************************************
718  *
719  * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
720  *
721  ****************************************************************************/
722 
723 /*
724  * Surface should receive video data (and VBI data if a surface
725  * is not explicitly attached for that purpose)
726  */
727 #define DDVPTARGET_VIDEO 0x00000001l
728 
729 /*
730  * Surface should receive VBI data
731  */
732 #define DDVPTARGET_VBI 0x00000002l
733 
734 
735 /****************************************************************************
736  *
737  * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
738  *
739  ****************************************************************************/
740 
741 /*
742  * Waits until the beginning of the next VSYNC
743  */
744 #define DDVPWAIT_BEGIN 0x00000001l
745 
746 /*
747  * Waits until the end of the next/current VSYNC
748  */
749 #define DDVPWAIT_END 0x00000002l
750 
751 /*
752  * Waits until the beginning of the specified line
753  */
754 #define DDVPWAIT_LINE 0x00000003l
755 
756 /****************************************************************************
757  *
758  * DIRECTDRAWVIDEOPORT FLIP FLAGS
759  *
760  ****************************************************************************/
761 
762 /*
763  * Flips the normal video surface
764  */
765 #define DDVPFLIP_VIDEO 0x00000001l
766 
767 /*
768  * Flips the VBI surface
769  */
770 #define DDVPFLIP_VBI 0x00000002l
771 
772 /****************************************************************************
773  *
774  * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
775  *
776  ****************************************************************************/
777 
778 /*
779  * No video signal is present at the video port
780  */
781 #define DDVPSQ_NOSIGNAL 0x00000001l
782 
783 /*
784  * A valid video signal is present at the video port
785  */
786 #define DDVPSQ_SIGNALOK 0x00000002l
787 
788 /****************************************************************************
789  *
790  * VIDEOPORTBANDWIDTH Flags
791  *
792  ****************************************************************************/
793 
794 /*
795  * The specified height/width refer to the size of the video port data
796  * written into memory, after prescaling has occured.
797  */
798 #define DDVPB_VIDEOPORT 0x00000001l
799 
800 /*
801  * The specified height/width refer to the source size of the overlay.
802  */
803 #define DDVPB_OVERLAY 0x00000002l
804 
805 /*
806  * This is a query for the device to return which caps this device requires.
807  */
808 #define DDVPB_TYPE 0x00000004l
809 
810 /****************************************************************************
811  *
812  * VIDEOPORTBANDWIDTH Caps
813  *
814  ****************************************************************************/
815 
816 /*
817  * The bandwidth for this device is dependant on the overlay source size.
818  */
819 #define DDVPBCAPS_SOURCE 0x00000001l
820 
821 /*
822  * The bandwidth for this device is dependant on the overlay destination
823  * size.
824  */
825 #define DDVPBCAPS_DESTINATION 0x00000002l
826 
827 
828 #ifdef __cplusplus
829 };
830 #endif
831 
832 #endif
DWORD dwVideoPortID
Definition: vdvp.h:281
DWORD dwReserved2
Definition: vdvp.h:336
DWORD dwReserved3
Definition: vdvp.h:337
struct _DDVIDEOPORTSTATUS FAR * LPDDVIDEOPORTSTATUS
Definition: vdvp.h:68
DWORD dwMicrosecondsPerField
Definition: vdvp.h:279
DWORD dwVBIHeight
Definition: vdvp.h:304
DWORD dwOriginX
Definition: vdvp.h:295
DWORD dwCaps
Definition: vdvp.h:220
DWORD dwYInterpolate
Definition: vdvp.h:319
DWORD dwAlignVideoPortBoundary
Definition: vdvp.h:223
DWORD dwAlignVideoPortCropWidth
Definition: vdvp.h:226
DWORD dwVideoPortID
Definition: vdvp.h:219
struct _DDVIDEOPORTINFO DDVIDEOPORTINFO
unsigned long * LPDWORD
Definition: config.h:90
DWORD dwMaxPixelsPerSecond
Definition: vdvp.h:280
DDPIXELFORMAT FAR * LPDDPIXELFORMAT
Definition: vddraw.h:377
DWORD dwVPFlags
Definition: vdvp.h:297
struct _DDVIDEOPORTCONNECT FAR * LPDDVIDEOPORTCONNECT
Definition: vdvp.h:63
struct _DDVIDEOPORTCONNECT DDVIDEOPORTCONNECT
DWORD dwSize
Definition: vdvp.h:331
#define PASCAL
Definition: config.h:74
DECLARE_INTERFACE_(IDPAsyncData, IUnknown)
Definition: vasync.h:46
DWORD dwVBIWidth
Definition: vdvp.h:277
struct _DDVIDEOPORTBANDWIDTH DDVIDEOPORTBANDWIDTH
DWORD dwFieldHeight
Definition: vdvp.h:278
DWORD dwPrescaleHeight
Definition: vdvp.h:300
typedef LPVOID
Definition: vdvp.h:77
#define IUnknown
Definition: vdvp.h:17
DWORD dwReserved1
Definition: vdvp.h:282
DWORD dwOriginY
Definition: vdvp.h:296
DWORD dwReserved3
Definition: vdvp.h:285
struct _DDVIDEOPORTINFO FAR * LPDDVIDEOPORTINFO
Definition: vdvp.h:66
LPDDPIXELFORMAT lpddpfInputFormat
Definition: vdvp.h:301
DWORD dwReserved1
Definition: vdvp.h:230
DWORD dwPreshrinkYStep
Definition: vdvp.h:228
DWORD dwPortWidth
Definition: vdvp.h:202
DWORD dwAlignVideoPortPrescaleWidth
Definition: vdvp.h:224
unsigned long DWORD
Definition: config.h:90
DWORD dwFlags
Definition: vdvp.h:215
struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS
Definition: vdvp.h:71
DWORD dwNumVBIAutoFlipSurfaces
Definition: vdvp.h:229
#define FAR
Definition: config.h:77
DWORD dwPrescaleWidth
Definition: vdvp.h:299
DWORD dwSize
Definition: vdvp.h:275
int BOOL
Definition: config.h:80
struct _DDVIDEOPORTCAPS DDVIDEOPORTCAPS
struct IDirectDrawSurface FAR * LPDIRECTDRAWSURFACE
Definition: vddraw.h:74
DWORD dwReserved2
Definition: vdvp.h:284
struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS
Definition: vdvp.h:70
struct _DDVIDEOPORTSTATUS DDVIDEOPORTSTATUS
DDVIDEOPORTCONNECT VideoPortType
Definition: vdvp.h:283
typedef HRESULT(FAR PASCAL *LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS
DWORD dwReserved2
Definition: vdvp.h:231
struct IDDVideoPortContainer FAR * LPDDVIDEOPORTCONTAINER
Definition: vdvp.h:60
DWORD dwNumAutoFlipSurfaces
Definition: vdvp.h:222
DWORD dwYInterpAndColorkey
Definition: vdvp.h:320
DWORD dwFX
Definition: vdvp.h:221
DWORD dwMaxHeight
Definition: vdvp.h:218
struct _DDVIDEOPORTCAPS FAR * LPDDVIDEOPORTCAPS
Definition: vdvp.h:64
DWORD dwMaxWidth
Definition: vdvp.h:216
DWORD dwReserved1
Definition: vdvp.h:305
RECT rCrop
Definition: vdvp.h:298
DWORD dwPreshrinkXStep
Definition: vdvp.h:227
DDVIDEOPORTCONNECT VideoPortType
Definition: vdvp.h:335
struct _DDCOLORCONTROL FAR * LPDDCOLORCONTROL
Definition: vddraw.h:84
DWORD dwFlags
Definition: vdvp.h:333
DWORD dwSize
Definition: vdvp.h:294
DEFINE_GUID(IID_IDPAsyncData, 0x47bcd7e0, 0x2e89, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c)
DWORD dwAlignVideoPortCropBoundary
Definition: vdvp.h:225
DWORD dwFieldWidth
Definition: vdvp.h:276
DWORD dwReserved1
Definition: vdvp.h:205
struct IDirectDrawVideoPort FAR * LPDIRECTDRAWVIDEOPORT
Definition: vdvp.h:61
DWORD dwReserved2
Definition: vdvp.h:306
LPDDPIXELFORMAT lpddpfVBIInputFormat
Definition: vdvp.h:302
struct _DDVIDEOPORTDESC DDVIDEOPORTDESC
struct _DDVIDEOPORTDESC FAR * LPDDVIDEOPORTDESC
Definition: vdvp.h:65
LPDDPIXELFORMAT lpddpfVBIOutputFormat
Definition: vdvp.h:303
DWORD dwMaxVBIWidth
Definition: vdvp.h:217
DWORD dwSize
Definition: vdvp.h:214
DWORD dwReserved1
Definition: vdvp.h:334
struct _DDVIDEOPORTBANDWIDTH FAR * LPDDVIDEOPORTBANDWIDTH
Definition: vdvp.h:67