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.

175 lines
7.7 KiB

  1. //==========================================================================;
  2. //
  3. // Copyright (c) 1992 - 1997 Microsoft Corporation. All Rights Reserved.
  4. //
  5. //--------------------------------------------------------------------------;
  6. // An interface exposed by the overlay mixer to help decode samples using hardware
  7. // video acceleration
  8. import "unknwn.idl";
  9. cpp_quote("//")
  10. cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make")
  11. cpp_quote("// the motncomp.idl file build. The actual definitions are contained in ddraw.h and amva.h")
  12. cpp_quote("//")
  13. cpp_quote("#if 0")
  14. typedef void* LPVOID;
  15. typedef void* LPGUID;
  16. typedef void* LPDIRECTDRAWSURFACE;
  17. typedef void* LPDDPIXELFORMAT;
  18. typedef void* LPAMVAInternalMemInfo;
  19. typedef void AMVAUncompDataInfo;
  20. typedef void* LPAMVACompBufferInfo;
  21. typedef void AMVABUFFERINFO;
  22. typedef void AMVAEndFrameInfo;
  23. typedef void* LPAMVAUncompBufferInfo;
  24. typedef void AMVABeginFrameInfo;
  25. typedef IUnknown* IMediaSample;
  26. cpp_quote("#endif")
  27. cpp_quote("#include <ddraw.h>")
  28. cpp_quote("#include <amva.h>")
  29. cpp_quote("")
  30. cpp_quote("/* Define interface guids */")
  31. cpp_quote("DEFINE_GUID(IID_IAMVideoAcceleratorNotify,0x256A6A21,0xFBAD,0x11d1,0x82,0xBF,0x00,0xA0,0xC9,0x69,0x6C,0x8F);")
  32. cpp_quote("DEFINE_GUID(IID_IAMVideoAccelerator,0x256A6A22,0xFBAD,0x11d1,0x82,0xBF,0x00,0xA0,0xC9,0x69,0x6C,0x8F);")
  33. [
  34. local,
  35. object,
  36. uuid(256A6A21-FBAD-11d1-82BF-00A0C9696C8F),
  37. helpstring("IAMVideoAcceleratorNotify Interface"),
  38. pointer_default(unique)
  39. ]
  40. // IAMVideoAcceleratorNotify
  41. interface IAMVideoAcceleratorNotify : IUnknown
  42. {
  43. // get information necessary to allocate uncompressed data buffers
  44. // which is not part of the mediatype format (like how many buffers to allocate etc)
  45. HRESULT GetUncompSurfacesInfo([in] const GUID *pGuid, [in] [out] LPAMVAUncompBufferInfo pUncompBufferInfo);
  46. // set information regarding allocated uncompressed data buffers
  47. HRESULT SetUncompSurfacesInfo([in] DWORD dwActualUncompSurfacesAllocated);
  48. // get information necessary to create video accelerator object. It is the caller's responsibility
  49. // to call CoTaskMemFree() on *ppMiscData
  50. HRESULT GetCreateVideoAcceleratorData([in] const GUID *pGuid, [out] LPDWORD pdwSizeMiscData, [out] LPVOID *ppMiscData);
  51. };
  52. [
  53. local,
  54. object,
  55. uuid(256A6A22-FBAD-11d1-82BF-00A0C9696C8F),
  56. helpstring("IAMVideoAccelerator Interface"),
  57. pointer_default(unique)
  58. ]
  59. // IAMVideoAccelerator
  60. interface IAMVideoAccelerator : IUnknown
  61. {
  62. // pdwNumGuidsSupported is an IN OUT paramter
  63. // pGuidsSupported is an IN OUT paramter
  64. // if pGuidsSupported is NULL, pdwNumGuidsSupported should return back with the
  65. // number of uncompressed pixel formats supported
  66. // Otherwise pGuidsSupported is an array of *pdwNumGuidsSupported structures
  67. HRESULT GetVideoAcceleratorGUIDs([in] [out] LPDWORD pdwNumGuidsSupported, [in] [out] LPGUID pGuidsSupported);
  68. // pGuid is an IN parameter
  69. // pdwNumFormatsSupported is an IN OUT paramter
  70. // pFormatsSupported is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  71. // if pFormatsSupported is NULL, pdwNumFormatsSupported should return back with
  72. // the number of uncompressed pixel formats supported
  73. // Otherwise pFormatsSupported is an array of *pdwNumFormatsSupported structures
  74. HRESULT GetUncompFormatsSupported( [in] const GUID *pGuid, [in] [out] LPDWORD pdwNumFormatsSupported,
  75. [in] [out] LPDDPIXELFORMAT pFormatsSupported);
  76. // pGuid is an IN parameter
  77. // pamvaUncompDataInfo is an IN parameter
  78. // pamvaInternalMemInfo is an IN OUT parameter (caller should make sure to set the size of struct)
  79. // currently only gets info about how much scratch memory will the hal allocate for its private use
  80. HRESULT GetInternalMemInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
  81. [in] [out] LPAMVAInternalMemInfo pamvaInternalMemInfo);
  82. // pGuid is an IN parameter
  83. // pamvaUncompDataInfo is an IN parameter
  84. // pdwNumTypesCompBuffers is an IN OUT paramter
  85. // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  86. // if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of
  87. // compressed buffers
  88. // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
  89. HRESULT GetCompBufferInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
  90. [in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
  91. // pdwNumTypesCompBuffers is an IN OUT paramter
  92. // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
  93. // if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of
  94. // compressed buffers
  95. // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
  96. // only valid to call this after the pins are connected
  97. HRESULT GetInternalCompBufferInfo([in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
  98. // begin a frame, the pMiscData is passed directly to the hal
  99. // only valid to call this after the pins are connected
  100. // Tells the ovmixer which frame is the destination
  101. // frame. Use indices (valid vales are [0 .. pdwNumSurfacesAllocated-1]) to specify frames
  102. HRESULT BeginFrame([in] const AMVABeginFrameInfo *amvaBeginFrameInfo);
  103. // end a frame, the pMiscData is passed directly to the hal
  104. // only valid to call this after the pins are connected
  105. HRESULT EndFrame([in] const AMVAEndFrameInfo *pEndFrameInfo);
  106. // lock and obtain access to a single buffer
  107. // only valid to call this after the pins are connected
  108. // Buffers are identified by type and index within that type
  109. // Specifiying read-only will allow access to busy reference
  110. // frames
  111. // Output (uncompressed) frames use a type index of 0xFFFFFFFF
  112. HRESULT GetBuffer(
  113. [in] DWORD dwTypeIndex,
  114. [in] DWORD dwBufferIndex,
  115. [in] BOOL bReadOnly,
  116. [out] LPVOID *ppBuffer,
  117. [out] LONG *lpStride);
  118. // unlock a single buffer
  119. // Buffers are identified by type and index within that type
  120. // only valid to call this after the pins are connected
  121. HRESULT ReleaseBuffer([in] DWORD dwTypeIndex, [in] DWORD dwBufferIndex);
  122. // Perform a decompression operation
  123. // Private data can be passed to and from a driver
  124. // identifiers for the corresponding members of pamvaMacroBlockInfo
  125. // pamvaMacroBlockInfo is an IN parameter which is array (of length dwNumBlocks) of structures
  126. // only valid to call this after the pins are connected
  127. HRESULT Execute(
  128. [in] DWORD dwFunction,
  129. [in] LPVOID lpPrivateInputData,
  130. [in] DWORD cbPrivateInputData,
  131. [in] LPVOID lpPrivateOutputDat,
  132. [in] DWORD cbPrivateOutputData,
  133. [in] DWORD dwNumBuffers,
  134. [in] const AMVABUFFERINFO *pamvaBufferInfo);
  135. // query the decode status of a particular decompression operation
  136. // dwTypeIndex and dwBufferIndex define the buffer whose status is
  137. // being queried
  138. HRESULT QueryRenderStatus([in] DWORD dwTypeIndex,
  139. [in] DWORD dwBufferIndex,
  140. [in] DWORD dwFlags);
  141. // display a frame. The mediasample contains the timestamps etc for the frame to be displayed
  142. // this call is a non-blocking call
  143. // only valid to call this after the pins are connected
  144. HRESULT DisplayFrame([in] DWORD dwFlipToIndex, [in] IMediaSample *pMediaSample);
  145. };