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.

172 lines
7.6 KiB

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