Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

916 lines
30 KiB

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