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.

215 lines
10 KiB

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