Source code of Windows XP (NT5)
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.

937 lines
29 KiB

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