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.

220 lines
10 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddmc.h
  6. * Content: DirectDrawMotionComp include file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 22-sep-97 smac
  12. *@@END_MSINTERNAL
  13. *
  14. ***************************************************************************/
  15. #ifndef __DDVA_INCLUDED__
  16. #define __DDVA_INCLUDED__
  17. #if defined( _WIN32 ) && !defined( _NO_COM )
  18. #define COM_NO_WINDOWS_H
  19. #include <objbase.h>
  20. #else
  21. #define IUnknown void
  22. #undef CO_E_NOTINITIALIZED
  23. #define CO_E_NOTINITIALIZED 0x800401F0L
  24. #endif
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. /*
  29. * GUIDS used by DirectDrawVideoAccelerator objects
  30. */
  31. #if defined( _WIN32 ) && !defined( _NO_COM )
  32. DEFINE_GUID( IID_IDDVideoAcceleratorContainer, 0xACA12120,0x3356,0x11D1,0x8F,0xCF,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  33. DEFINE_GUID( IID_IDirectDrawVideoAccelerator, 0xC9B2D740,0x3356,0x11D1,0x8F,0xCF,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  34. #endif
  35. /*============================================================================
  36. *
  37. * DirectDraw Structures
  38. *
  39. * Various structures used to invoke DirectDraw.
  40. *
  41. *==========================================================================*/
  42. struct IDirectDraw;
  43. struct IDirectDrawSurface;
  44. struct IDirectDrawPalette;
  45. struct IDirectDrawClipper;
  46. typedef struct IDDVideoAcceleratorContainer FAR *LPDDVIDEOACCELERATORCONTAINER;
  47. typedef struct IDirectDrawVideoAccelerator FAR *LPDIRECTDRAWVIDEOACCELERATOR;
  48. typedef struct IDDVideoAcceleratorContainerVtbl DDVIDEOACCELERATORCONTAINERCALLBACKS;
  49. typedef struct IDirectDrawVideoAcceleratorVtbl DIRECTDRAWVIDEOACCELERATORCALLBACKS;
  50. typedef struct _tag_DDVAUncompDataInfo
  51. {
  52. DWORD dwSize; // [in] size of the struct
  53. DWORD dwUncompWidth; // [in] width of uncompressed data
  54. DWORD dwUncompHeight; // [in] height of uncompressed data
  55. DDPIXELFORMAT ddUncompPixelFormat; // [in] pixel-format of uncompressed data
  56. } DDVAUncompDataInfo, *LPDDVAUncompDataInfo;
  57. typedef struct _tag_DDVAInternalMemInfo
  58. {
  59. DWORD dwSize; // [in] size of the struct
  60. DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use
  61. } DDVAInternalMemInfo, *LPDDVAInternalMemInfo;
  62. typedef struct _tag_DDVACompBufferInfo
  63. {
  64. DWORD dwSize; // [in] size of the struct
  65. DWORD dwNumCompBuffers; // [out] number of buffers reqd for compressed data
  66. DWORD dwWidthToCreate; // [out] Width of surface to create
  67. DWORD dwHeightToCreate; // [out] Height of surface to create
  68. DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface
  69. DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data
  70. DDPIXELFORMAT ddPixelFormat; // [out] fourcc to create surfaces to store compressed data
  71. } DDVACompBufferInfo, *LPDDVACompBufferInfo;
  72. // Note that you are NOT allowed to store any pointer in pMiscData
  73. typedef struct _tag_DDVABeginFrameInfo
  74. {
  75. DWORD dwSize; // [in] size of the struct
  76. LPDIRECTDRAWSURFACE7 pddDestSurface; // [in] destination buffer in which to decoding this frame
  77. DWORD dwSizeInputData; // [in] size of other misc data to begin frame
  78. LPVOID pInputData; // [in] pointer to misc data
  79. DWORD dwSizeOutputData; // [in/out] size of other misc data to begin frame
  80. LPVOID pOutputData; // [out] pointer to misc data
  81. } DDVABeginFrameInfo, *LPDDVABeginFrameInfo;
  82. // Note that you are NOT allowed to store any pointer in pMiscData
  83. typedef struct _tag_DDVAEndFrameInfo
  84. {
  85. DWORD dwSize; // [in] size of the struct
  86. DWORD dwSizeMiscData; // [in] size of other misc data to begin frame
  87. LPVOID pMiscData; // [in] pointer to misc data
  88. } DDVAEndFrameInfo, *LPDDVAEndFrameInfo;
  89. typedef struct _tag_DDVABUFFERINFO
  90. {
  91. DWORD dwSize; // [in] size of the struct
  92. LPDIRECTDRAWSURFACE7 pddCompSurface; // [in] pointer to buffer containing compressed data
  93. DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer
  94. DWORD dwDataSize; // [in] size of relevant data
  95. } DDVABUFFERINFO, *LPDDVABUFFERINFO;
  96. /*
  97. * INTERACES FOLLOW:
  98. * IDDVideoAcceleratorContainer
  99. * IDirectDrawVideoAccelerator
  100. */
  101. /*
  102. * IDDVideoAcceleratorContainer
  103. */
  104. #if defined( _WIN32 ) && !defined( _NO_COM )
  105. #undef INTERFACE
  106. #define INTERFACE IDDVideoAcceleratorContainer
  107. DECLARE_INTERFACE_( IDDVideoAcceleratorContainer, IUnknown )
  108. {
  109. /*** IUnknown methods ***/
  110. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  111. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  112. STDMETHOD_(ULONG,Release) (THIS) PURE;
  113. /*** IDDVideoAcceleratorContainer methods ***/
  114. STDMETHOD(CreateVideoAccelerator)(THIS_ LPGUID, LPDDVAUncompDataInfo, LPVOID, DWORD, LPDIRECTDRAWVIDEOACCELERATOR FAR *, IUnknown FAR *) PURE;
  115. STDMETHOD(GetCompBufferInfo)(THIS_ LPGUID, LPDDVAUncompDataInfo, LPDWORD, LPDDVACompBufferInfo ) PURE;
  116. STDMETHOD(GetInternalMemInfo)(THIS_ LPGUID, LPDDVAUncompDataInfo, LPDDVAInternalMemInfo ) PURE;
  117. STDMETHOD(GetVideoAcceleratorGUIDs)(THIS_ LPDWORD, LPGUID ) PURE;
  118. STDMETHOD(GetUncompFormatsSupported)(THIS_ LPGUID, LPDWORD, LPDDPIXELFORMAT ) PURE;
  119. };
  120. #if !defined(__cplusplus) || defined(CINTERFACE)
  121. #define IVideoAcceleratorContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  122. #define IVideoAcceleratorContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
  123. #define IVideoAcceleratorContainer_Release(p) (p)->lpVtbl->Release(p)
  124. #define IVideoAcceleratorContainer_CreateVideoAccelerator(p,a,b,c,d,e,f) (p)->lpVtbl->CreateVideoAccelerator(p, a, b, c, d, e, f)
  125. #define IVideoAcceleratorContainer_GetCompBufferInfo(p, a, b, c, d) (p)->lpVtbl->GetCompBufferInfo(p, a, b, c, d)
  126. #define IVideoAcceleratorContainer_GetInternalMemInfo(p, a, b, c) (p)->lpVtbl->GetInternalMemInfo(p, a, b, c)
  127. #define IVideoAcceleratorContainer_GetVideoAcceleratorGUIDs(p, a, b) (p)->lpVtbl->GetVideoAcceleratorGUIDs(p, a, b)
  128. #define IVideoAcceleratorContainer_GetUncompFormatsSupported(p,a,b,c) (p)->lpVtbl->GetUncompFormatsSupported(p, a, b, c)
  129. #else
  130. #define IVideoAcceleratorContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
  131. #define IVideoAcceleratorContainer_AddRef(p) (p)->AddRef()
  132. #define IVideoAcceleratorContainer_Release(p) (p)->Release()
  133. #define IVideoAcceleratorContainer_CreateVideoAccelerator(p, a, b, c,d,e,f) (p)->CreateVideoAccelerator(a, b, c, d, e, f)
  134. #define IVideoAcceleratorContainer_GetCompBufferInfo(p, a, b, c, d) (p)->GetCompBufferInfo(a, b, c, d)
  135. #define IVideoAcceleratorContainer_GetInternalMemInfo(p, a, b, c) (p)->GetInternalMemInfo(a, b, c)
  136. #define IVideoAcceleratorContainer_GetVideoAcceleratorGUIDs(p, a, b) (p)->GetVideoAcceleratorGUIDs(a, b)
  137. #define IVideoAcceleratorContainer_GetUncompFormatsSupported(p,a,b,c) (p)->GetUncompFormatsSupported(a, b, c)
  138. #endif
  139. #endif
  140. /*
  141. * IDirectDrawVideoAccelerator
  142. */
  143. #if defined( _WIN32 ) && !defined( _NO_COM )
  144. #undef INTERFACE
  145. #define INTERFACE IDirectDrawVideoAccelerator
  146. DECLARE_INTERFACE_( IDirectDrawVideoAccelerator, IUnknown )
  147. {
  148. /*** IUnknown methods ***/
  149. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  150. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  151. STDMETHOD_(ULONG,Release) (THIS) PURE;
  152. /*** IDirecytDrawVideoAccelerator methods ***/
  153. STDMETHOD(BeginFrame)(THIS_ LPDDVABeginFrameInfo) PURE;
  154. STDMETHOD(EndFrame)(THIS_ LPDDVAEndFrameInfo) PURE;
  155. STDMETHOD(QueryRenderStatus)(THIS_ LPDIRECTDRAWSURFACE7, DWORD)PURE;
  156. STDMETHOD(Execute)(THIS_
  157. DWORD, // Function
  158. LPVOID, // Input data
  159. DWORD, // Input data length
  160. LPVOID, // Output data
  161. DWORD, // Output data length
  162. DWORD, // Number of buffers
  163. LPDDVABUFFERINFO // Buffer info array
  164. ) PURE;
  165. };
  166. // Flags for QueryRenderStatus
  167. #define DDVA_QUERYRENDERSTATUSF_READ 0x00000001 // Query for read
  168. // set this bit to 0
  169. // if query for update
  170. #if !defined(__cplusplus) || defined(CINTERFACE)
  171. #define IVideoAccelerator_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  172. #define IVideoAccelerator_AddRef(p) (p)->lpVtbl->AddRef(p)
  173. #define IVideoAccelerator_Release(p) (p)->lpVtbl->Release(p)
  174. #define IVideoAccelerator_BeginFrame(p,a) (p)->lpVtbl->BeginFrame(p,a)
  175. #define IVideoAccelerator_EndFrame(p,a) (p)->lpVtbl->EndFrame(p,a)
  176. #define IVideoAccelerator_QueryRenderStatus(p,a,b) (p)->lpVtbl->QueryRenderStatus(p,a,b)
  177. #define IVideoAccelerator_RenderMacroBlocks(p,a,b) (p)->lpVtbl->RenderMacroBlocks(p,a,b)
  178. #else
  179. #define IVideoAccelerator_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  180. #define IVideoAccelerator_AddRef(p) (p)->AddRef()
  181. #define IVideoAccelerator_Release(p) (p)->Release()
  182. #define IVideoAccelerator_BeginFrame(p,a) (p)->BeginFrame(a)
  183. #define IVideoAccelerator_EndFrame(p,a) (p)->EndFrame(a)
  184. #define IVideoAccelerator_QueryRenderStatus(p,a,b) (p)->QueryRenderStatus(a,b)
  185. #define IVideoAccelerator_RenderMacroBlocks(p,a,b) (p)->RenderMacroBlocks(a,b)
  186. #endif
  187. #endif
  188. #ifdef __cplusplus
  189. };
  190. #endif
  191. #endif