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.

239 lines
5.2 KiB

  1. // ap.idl : IDL source for VMRAllocPresenter.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (ap.tlb) and marshalling code.
  5. //=====================================================================
  6. import "unknwn.idl";
  7. cpp_quote("#ifdef DSHOW_INDEPENDENT")
  8. typedef struct _AMMediaType {
  9. GUID majortype;
  10. GUID subtype;
  11. BOOL bFixedSizeSamples;
  12. BOOL bTemporalCompression;
  13. ULONG lSampleSize;
  14. GUID formattype;
  15. IUnknown *pUnk;
  16. ULONG cbFormat;
  17. [size_is(cbFormat)] BYTE * pbFormat;
  18. } AM_MEDIA_TYPE;
  19. cpp_quote ("#endif")
  20. cpp_quote("#if 0")
  21. // This is temporary hack to get around the fact thatI don't know how to persuade
  22. // MIDL to allow forward declarations.
  23. typedef DWORD* LPDIRECTDRAW7;
  24. typedef DWORD* LPDIRECTDRAWSURFACE7;
  25. cpp_quote ("#endif")
  26. cpp_quote("#include <ddraw.h>")
  27. interface IVMRSurface;
  28. interface IVMRSurfaceAllocator;
  29. interface IVMRSurfaceAllocatorInternal;
  30. interface IVMRSurfaceAllocatorNotify;
  31. interface IVMRWindowlessControl;
  32. import "oaidl.idl";
  33. import "ocidl.idl";
  34. [
  35. object,
  36. uuid(a9849bbe-9ec8-4263-b764-62730f0d15d0),
  37. helpstring("IVMRSurfaceAllocator Interface"),
  38. pointer_default(unique)
  39. ]
  40. interface IVMRSurface : IUnknown
  41. {
  42. HRESULT IsSurfaceLocked();
  43. HRESULT LockSurface(
  44. [out] BYTE** lpSurface
  45. );
  46. HRESULT UnlockSurface();
  47. HRESULT GetSurface(
  48. [out] LPDIRECTDRAWSURFACE7 *lplpSurface
  49. );
  50. };
  51. [
  52. object,
  53. uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
  54. helpstring("IVMRSurfaceAllocator Interface"),
  55. pointer_default(unique)
  56. ]
  57. interface IVMRSurfaceAllocator : IUnknown
  58. {
  59. HRESULT AllocateSurfaces(
  60. [in] const AM_MEDIA_TYPE* pmt,
  61. [in] [out] DWORD* lpdwBackBuffers,
  62. [out] AM_MEDIA_TYPE **ppmt
  63. );
  64. HRESULT FreeSurfaces(
  65. );
  66. HRESULT GetNextSurface(
  67. [out] LPDIRECTDRAWSURFACE7 *lplpSurface,
  68. [in] DWORD dwSurfaceFlags
  69. );
  70. };
  71. [
  72. object,
  73. uuid(26716b2e-9b79-4a48-8ddf-a8131183803b),
  74. helpstring("IVMRSurfaceAllocatorInternal Interface"),
  75. pointer_default(unique)
  76. ]
  77. interface IVMRSurfaceAllocatorInternal : IVMRSurfaceAllocator
  78. {
  79. HRESULT AdviseNotify(
  80. [in] IVMRSurfaceAllocatorNotify* lpIVMRSurfaceAllocatorNotify
  81. );
  82. };
  83. [
  84. object,
  85. uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
  86. helpstring("IVMRSurfaceAllocatorNotify Interface"),
  87. pointer_default(unique)
  88. ]
  89. interface IVMRSurfaceAllocatorNotify : IUnknown
  90. {
  91. HRESULT AdviseSurfaceAllocator(
  92. [in] IVMRSurfaceAllocator* lpIVRMSurfaceAllocator
  93. );
  94. HRESULT SetDDrawDevice(
  95. [in] LPDIRECTDRAW7 lpDDrawDevice
  96. );
  97. HRESULT ChangeDDrawDevice(
  98. [in] LPDIRECTDRAW7 lpDDrawDevice
  99. );
  100. HRESULT RestoreDDrawSurfaces(
  101. );
  102. };
  103. [
  104. object,
  105. uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
  106. helpstring("IVMRWindowlessControl Interface"),
  107. pointer_default(unique)
  108. ]
  109. interface IVMRWindowlessControl : IUnknown
  110. {
  111. //
  112. //////////////////////////////////////////////////////////
  113. // Video size and position information
  114. //////////////////////////////////////////////////////////
  115. //
  116. HRESULT GetNativeVideoSize(
  117. [in] LONG* lpWidth,
  118. [in] LONG* lpHeight,
  119. [in] LONG* lpARWidth,
  120. [in] LONG* lpARHeight
  121. );
  122. HRESULT GetMinIdealVideoSize(
  123. [in] LONG* lpWidth,
  124. [in] LONG* lpHeight
  125. );
  126. HRESULT GetMaxIdealVideoSize(
  127. [in] LONG* lpWidth,
  128. [in] LONG* lpHeight
  129. );
  130. HRESULT SetVideoPosition(
  131. [in] const LPRECT lpSRCRect,
  132. [in] const LPRECT lpDSTRect
  133. );
  134. HRESULT GetVideoPosition(
  135. [out] LPRECT lpSRCRect,
  136. [out] LPRECT lpDSTRect
  137. );
  138. HRESULT GetAspectRatioMode(
  139. [out] DWORD* lpAspectRatioMode
  140. );
  141. HRESULT SetAspectRatioMode(
  142. [in] DWORD AspectRatioMode
  143. );
  144. //
  145. //////////////////////////////////////////////////////////
  146. // Display and clipping management
  147. //////////////////////////////////////////////////////////
  148. //
  149. HRESULT SetVideoClippingWindow(
  150. [in] HWND hwnd
  151. );
  152. HRESULT RepaintVideo(
  153. [in] HWND hwnd,
  154. [in] HDC hdc
  155. );
  156. HRESULT DisplayModeChanged();
  157. //
  158. //////////////////////////////////////////////////////////
  159. // Color control
  160. //////////////////////////////////////////////////////////
  161. //
  162. HRESULT SetBorderColor(
  163. [in] COLORREF Clr
  164. );
  165. HRESULT GetBorderColor(
  166. [out] COLORREF* lpClr
  167. );
  168. HRESULT SetColorKey(
  169. [in] COLORREF Clr
  170. );
  171. HRESULT GetColorKey(
  172. [out] COLORREF* lpClr
  173. );
  174. };
  175. [
  176. uuid(529b581a-2f2c-4a77-be9b-d8866d48dd4c),
  177. version(1.0),
  178. helpstring("Allocator/Presenter 1.0 Type Library")
  179. ]
  180. library ALLOCATORPRESENTERLib
  181. {
  182. importlib("stdole2.tlb");
  183. [
  184. uuid(33eb53cc-58c1-403e-92b3-732ebcf98017),
  185. helpstring("AllocatorPresenter Class")
  186. ]
  187. coclass AllocPresenter
  188. {
  189. [default] interface IVMRSurfaceAllocatorInternal;
  190. };
  191. };