Counter Strike : Global Offensive Source Code
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.

966 lines
31 KiB

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