mfobjects.idl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  1. cpp_quote("/**")
  2. cpp_quote(" * This file is part of the mingw-w64 runtime package.")
  3. cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
  4. cpp_quote(" */")
  5. cpp_quote("")
  6. cpp_quote("#include <winapifamily.h>")
  7. cpp_quote("")
  8. import "unknwn.idl";
  9. import "propsys.idl";
  10. import "mediaobj.idl";
  11. #ifndef __QWORD_DEFINED
  12. #define __QWORD_DEFINED
  13. cpp_quote("")
  14. typedef ULONGLONG QWORD;
  15. #endif
  16. cpp_quote("")
  17. cpp_quote("#include <mmreg.h>")
  18. #include <mmreg.h>
  19. cpp_quote("")
  20. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  21. typedef enum _MF_ATTRIBUTE_TYPE {
  22. MF_ATTRIBUTE_UINT32 = VT_UI4,
  23. MF_ATTRIBUTE_UINT64 = VT_UI8,
  24. MF_ATTRIBUTE_DOUBLE = VT_R8,
  25. MF_ATTRIBUTE_GUID = VT_CLSID,
  26. MF_ATTRIBUTE_STRING = VT_LPWSTR,
  27. MF_ATTRIBUTE_BLOB = VT_VECTOR | VT_UI1,
  28. MF_ATTRIBUTE_IUNKNOWN = VT_UNKNOWN
  29. } MF_ATTRIBUTE_TYPE;
  30. cpp_quote("")
  31. typedef enum _MF_ATTRIBUTES_MATCH_TYPE {
  32. MF_ATTRIBUTES_MATCH_OUR_ITEMS = 0,
  33. MF_ATTRIBUTES_MATCH_THEIR_ITEMS = 1,
  34. MF_ATTRIBUTES_MATCH_ALL_ITEMS = 2,
  35. MF_ATTRIBUTES_MATCH_INTERSECTION = 3,
  36. MF_ATTRIBUTES_MATCH_SMALLER = 4
  37. } MF_ATTRIBUTES_MATCH_TYPE;
  38. cpp_quote("")
  39. [object, uuid (2cd2d921-c447-44a7-a13c-4adabfc247e3)]
  40. interface IMFAttributes : IUnknown {
  41. HRESULT GetItem (REFGUID guidKey,[in, out, ptr] PROPVARIANT *pValue);
  42. HRESULT GetItemType (REFGUID guidKey,[out] MF_ATTRIBUTE_TYPE *pType);
  43. HRESULT CompareItem (REFGUID guidKey, REFPROPVARIANT Value,[out] WINBOOL *pbResult);
  44. HRESULT Compare (IMFAttributes *pTheirs, MF_ATTRIBUTES_MATCH_TYPE MatchType,[out] WINBOOL *pbResult);
  45. HRESULT GetUINT32 (REFGUID guidKey,[out] UINT32 *punValue);
  46. HRESULT GetUINT64 (REFGUID guidKey,[out] UINT64 *punValue);
  47. HRESULT GetDouble (REFGUID guidKey,[out] double *pfValue);
  48. HRESULT GetGUID (REFGUID guidKey,[out] GUID *pguidValue);
  49. HRESULT GetStringLength (REFGUID guidKey,[out] UINT32 *pcchLength);
  50. HRESULT GetString (REFGUID guidKey,[out, size_is (cchBufSize)] LPWSTR pwszValue, UINT32 cchBufSize,[in, out, ptr] UINT32 *pcchLength);
  51. HRESULT GetAllocatedString (REFGUID guidKey,[out, size_is (,*pcchLength + 1)] LPWSTR *ppwszValue,[out] UINT32 *pcchLength);
  52. HRESULT GetBlobSize (REFGUID guidKey,[out] UINT32 *pcbBlobSize);
  53. HRESULT GetBlob (REFGUID guidKey,[out, size_is (cbBufSize)] UINT8 *pBuf, UINT32 cbBufSize,[in, out, ptr] UINT32 *pcbBlobSize);
  54. HRESULT GetAllocatedBlob (REFGUID guidKey,[out, size_is (,*pcbSize)] UINT8 **ppBuf,[out] UINT32 *pcbSize);
  55. HRESULT GetUnknown (REFGUID guidKey, REFIID riid,[out, iid_is (riid)] LPVOID *ppv);
  56. HRESULT SetItem (REFGUID guidKey, REFPROPVARIANT Value);
  57. HRESULT DeleteItem (REFGUID guidKey);
  58. HRESULT DeleteAllItems ();
  59. HRESULT SetUINT32 (REFGUID guidKey, UINT32 unValue);
  60. HRESULT SetUINT64 (REFGUID guidKey, UINT64 unValue);
  61. HRESULT SetDouble (REFGUID guidKey, double fValue);
  62. HRESULT SetGUID (REFGUID guidKey, REFGUID guidValue);
  63. HRESULT SetString (REFGUID guidKey,[in, string] LPCWSTR wszValue);
  64. HRESULT SetBlob (REFGUID guidKey,[in, size_is (cbBufSize)] const UINT8 *pBuf, UINT32 cbBufSize);
  65. HRESULT SetUnknown (REFGUID guidKey,[in] IUnknown *pUnknown);
  66. HRESULT LockStore ();
  67. HRESULT UnlockStore ();
  68. HRESULT GetCount ([out] UINT32 *pcItems);
  69. HRESULT GetItemByIndex (UINT32 unIndex,[out] GUID *pguidKey,[in, out, ptr] PROPVARIANT *pValue);
  70. HRESULT CopyAllItems ([in] IMFAttributes *pDest);
  71. };
  72. cpp_quote("")
  73. enum MF_ATTRIBUTE_SERIALIZE_OPTIONS {
  74. MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF = 0x00000001
  75. };
  76. cpp_quote("")
  77. cpp_quote("STDAPI MFSerializeAttributesToStream(IMFAttributes *pAttr, DWORD dwOptions, IStream *pStm);")
  78. cpp_quote("STDAPI MFDeserializeAttributesFromStream(IMFAttributes *pAttr, DWORD dwOptions, IStream *pStm);")
  79. cpp_quote("")
  80. [object, uuid (045fa593-8799-42b8-BC8D-8968c6453507), local,]
  81. interface IMFMediaBuffer : IUnknown {
  82. HRESULT Lock ([out] BYTE **ppbBuffer,[out] DWORD *pcbMaxLength,[out] DWORD *pcbCurrentLength);
  83. HRESULT Unlock ();
  84. HRESULT GetCurrentLength ([out] DWORD *pcbCurrentLength);
  85. HRESULT SetCurrentLength ([in] DWORD cbCurrentLength);
  86. HRESULT GetMaxLength ([out] DWORD *pcbMaxLength);
  87. }
  88. cpp_quote("")
  89. [object, uuid (c40a00f2-b93a-4d80-ae8c-5a1c634f58e4), local,]
  90. interface IMFSample : IMFAttributes {
  91. HRESULT GetSampleFlags ([out] DWORD *pdwSampleFlags);
  92. HRESULT SetSampleFlags ([in] DWORD dwSampleFlags);
  93. HRESULT GetSampleTime ([out] LONGLONG *phnsSampleTime);
  94. HRESULT SetSampleTime ([in] LONGLONG hnsSampleTime);
  95. HRESULT GetSampleDuration ([out] LONGLONG *phnsSampleDuration);
  96. HRESULT SetSampleDuration ([in] LONGLONG hnsSampleDuration);
  97. HRESULT GetBufferCount ([out] DWORD *pdwBufferCount);
  98. HRESULT GetBufferByIndex ([in] DWORD dwIndex,[out] IMFMediaBuffer **ppBuffer);
  99. HRESULT ConvertToContiguousBuffer ([out] IMFMediaBuffer **ppBuffer);
  100. HRESULT AddBuffer ([in] IMFMediaBuffer *pBuffer);
  101. HRESULT RemoveBufferByIndex ([in] DWORD dwIndex);
  102. HRESULT RemoveAllBuffers (void);
  103. HRESULT GetTotalLength ([out] DWORD *pcbTotalLength);
  104. HRESULT CopyToBuffer ([in] IMFMediaBuffer *pBuffer);
  105. };
  106. cpp_quote("")
  107. [object, uuid (7dc9d5f9-9ed9-44ec-9bbf-0600bb589fbb), local]
  108. interface IMF2DBuffer : IUnknown {
  109. HRESULT Lock2D ([out] BYTE **ppbScanline0,[out] LONG *plPitch);
  110. HRESULT Unlock2D ();
  111. HRESULT GetScanline0AndPitch ([out] BYTE **pbScanline0,[out] LONG *plPitch);
  112. HRESULT IsContiguousFormat ([out] WINBOOL *pfIsContiguous);
  113. HRESULT GetContiguousLength ([out] DWORD *pcbLength);
  114. HRESULT ContiguousCopyTo ([out, size_is (cbDestBuffer)] BYTE *pbDestBuffer,[in] DWORD cbDestBuffer);
  115. HRESULT ContiguousCopyFrom ([in, size_is (cbSrcBuffer)] const BYTE *pbSrcBuffer,[in] DWORD cbSrcBuffer);
  116. }
  117. cpp_quote("")
  118. typedef enum _MF2DBuffer_LockFlags {
  119. MF2DBuffer_LockFlags_LockTypeMask = 0x1 | 0x2 | 0x3,
  120. MF2DBuffer_LockFlags_Read = 0x1,
  121. MF2DBuffer_LockFlags_Write = 0x2,
  122. MF2DBuffer_LockFlags_ReadWrite = 0x3,
  123. MF2DBuffer_LockFlags_ForceDWORD = 0x7fffffff
  124. } MF2DBuffer_LockFlags;
  125. cpp_quote("")
  126. [object, uuid (33ae5ea6-4316-436f-8ddd-d73d22f829ec), local]
  127. interface IMF2DBuffer2 : IMF2DBuffer {
  128. HRESULT Lock2DSize ([in] MF2DBuffer_LockFlags lockFlags,[out] BYTE **ppbScanline0,[out] LONG *plPitch,[out] BYTE **ppbBufferStart,[out] DWORD *pcbBufferLength);
  129. HRESULT Copy2DTo ([in] IMF2DBuffer2 *pDestBuffer);
  130. };
  131. cpp_quote("")
  132. [object, uuid (e7174cfa-1c9e-48b1-8866-626226bfc258), local]
  133. interface IMFDXGIBuffer : IUnknown {
  134. HRESULT GetResource ([in] REFIID riid,[out] LPVOID *ppvObject);
  135. HRESULT GetSubresourceIndex ([out] UINT *puSubresource);
  136. HRESULT GetUnknown ([in] REFIID guid,[in] REFIID riid,[out] LPVOID *ppvObject);
  137. HRESULT SetUnknown ([in] REFIID guid,[in] IUnknown *pUnkData);
  138. };
  139. cpp_quote("")
  140. [object, uuid (44ae0fa8-ea31-4109-8d2e-4cae4997c555), local]
  141. interface IMFMediaType : IMFAttributes {
  142. HRESULT GetMajorType ([out] GUID *pguidMajorType);
  143. HRESULT IsCompressedFormat ([out] WINBOOL *pfCompressed);
  144. HRESULT IsEqual ([in] IMFMediaType *pIMediaType,[out] DWORD *pdwFlags);
  145. HRESULT GetRepresentation ([in] GUID guidRepresentation,[out] LPVOID *ppvRepresentation);
  146. HRESULT FreeRepresentation ([in] GUID guidRepresentation,[in] LPVOID pvRepresentation);
  147. };
  148. cpp_quote("")
  149. cpp_quote("#define MF_MEDIATYPE_EQUAL_MAJOR_TYPES 0x00000001")
  150. cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_TYPES 0x00000002")
  151. cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_DATA 0x00000004")
  152. cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA 0x00000008")
  153. cpp_quote("#endif")
  154. cpp_quote("")
  155. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  156. [object, uuid (26a0adc3-ce26-4672-9304-69552edd3faf), local]
  157. interface IMFAudioMediaType : IMFMediaType {
  158. const WAVEFORMATEX *GetAudioFormat ();
  159. };
  160. cpp_quote("")
  161. cpp_quote("#ifndef _WINGDI_")
  162. #ifndef RGBQUAD
  163. typedef DWORD RGBQUAD;
  164. #endif
  165. cpp_quote("")
  166. typedef struct {
  167. DWORD biSize;
  168. LONG biWidth;
  169. LONG biHeight;
  170. WORD biPlanes;
  171. WORD biBitCount;
  172. DWORD biCompression;
  173. DWORD biSizeImage;
  174. LONG biXPelsPerMeter;
  175. LONG biYPelsPerMeter;
  176. DWORD biClrUsed;
  177. DWORD biClrImportant;
  178. } BITMAPINFOHEADER;
  179. cpp_quote("")
  180. typedef struct {
  181. BITMAPINFOHEADER bmiHeader;
  182. RGBQUAD bmiColors[1];
  183. } BITMAPINFO;
  184. cpp_quote("#endif")
  185. cpp_quote("")
  186. typedef struct {
  187. GUID guidMajorType;
  188. GUID guidSubtype;
  189. } MFT_REGISTER_TYPE_INFO;
  190. cpp_quote("#endif")
  191. cpp_quote("#ifndef _MFVIDEOFORMAT_")
  192. cpp_quote("#define _MFVIDEOFORMAT_")
  193. cpp_quote("")
  194. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  195. typedef enum _MFVideoInterlaceMode {
  196. MFVideoInterlace_Unknown = 0,
  197. MFVideoInterlace_Progressive = 2,
  198. MFVideoInterlace_FieldInterleavedUpperFirst = 3,
  199. MFVideoInterlace_FieldInterleavedLowerFirst = 4,
  200. MFVideoInterlace_FieldSingleUpper = 5,
  201. MFVideoInterlace_FieldSingleLower = 6,
  202. MFVideoInterlace_MixedInterlaceOrProgressive= 7,
  203. MFVideoInterlace_Last,
  204. MFVideoInterlace_ForceDWORD = 0x7fffffff
  205. } MFVideoInterlaceMode;
  206. cpp_quote("")
  207. cpp_quote("#define MFVideoInterlace_FieldSingleUpperFirst MFVideoInterlace_FieldSingleUpper")
  208. cpp_quote("#define MFVideoInterlace_FieldSingleLowerFirst MFVideoInterlace_FieldSingleLower")
  209. cpp_quote("")
  210. typedef enum _MFVideoTransferFunction {
  211. MFVideoTransFunc_Unknown = 0,
  212. MFVideoTransFunc_10 = 1,
  213. MFVideoTransFunc_18 = 2,
  214. MFVideoTransFunc_20 = 3,
  215. MFVideoTransFunc_22 = 4,
  216. MFVideoTransFunc_709 = 5,
  217. MFVideoTransFunc_240M = 6,
  218. MFVideoTransFunc_sRGB = 7,
  219. MFVideoTransFunc_28 = 8,
  220. MFVideoTransFunc_Log_100 = 9,
  221. MFVideoTransFunc_Log_316 = 10,
  222. MFVideoTransFunc_709_sym = 11,
  223. MFVideoTransFunc_2020_const = 12,
  224. MFVideoTransFunc_2020 = 13,
  225. MFVideoTransFunc_26 = 14,
  226. MFVideoTransFunc_2084 = 15,
  227. MFVideoTransFunc_HLG = 16,
  228. MFVideoTransFunc_10_rel = 17,
  229. MFVideoTransFunc_Last,
  230. MFVideoTransFunc_ForceDWORD = 0x7fffffff
  231. } MFVideoTransferFunction;
  232. cpp_quote("")
  233. typedef enum _MFVideoPrimaries {
  234. MFVideoPrimaries_Unknown = 0,
  235. MFVideoPrimaries_reserved = 1,
  236. MFVideoPrimaries_BT709 = 2,
  237. MFVideoPrimaries_BT470_2_SysM = 3,
  238. MFVideoPrimaries_BT470_2_SysBG = 4,
  239. MFVideoPrimaries_SMPTE170M = 5,
  240. MFVideoPrimaries_SMPTE240M = 6,
  241. MFVideoPrimaries_EBU3213 = 7,
  242. MFVideoPrimaries_SMPTE_C = 8,
  243. MFVideoPrimaries_BT2020 = 9,
  244. MFVideoPrimaries_XYZ = 10,
  245. MFVideoPrimaries_DCI_P3 = 11,
  246. MFVideoPrimaries_ACES = 12,
  247. MFVideoPrimaries_Last,
  248. MFVideoPrimaries_ForceDWORD = 0x7fffffff
  249. } MFVideoPrimaries;
  250. cpp_quote("")
  251. typedef enum _MFVideoLighting {
  252. MFVideoLighting_Unknown = 0,
  253. MFVideoLighting_bright=1,
  254. MFVideoLighting_office=2,
  255. MFVideoLighting_dim=3,
  256. MFVideoLighting_dark=4,
  257. MFVideoLighting_Last,
  258. MFVideoLighting_ForceDWORD = 0x7fffffff
  259. } MFVideoLighting;
  260. cpp_quote("")
  261. typedef enum _MFVideoTransferMatrix {
  262. MFVideoTransferMatrix_Unknown = 0,
  263. MFVideoTransferMatrix_BT709 = 1,
  264. MFVideoTransferMatrix_BT601 = 2,
  265. MFVideoTransferMatrix_SMPTE240M = 3,
  266. MFVideoTransferMatrix_BT2020_10 = 4,
  267. MFVideoTransferMatrix_BT2020_12 = 5,
  268. MFVideoTransferMatrix_Last,
  269. MFVideoTransferMatrix_ForceDWORD = 0x7fffffff
  270. } MFVideoTransferMatrix;
  271. cpp_quote("")
  272. typedef enum _MFVideoChromaSubsampling {
  273. MFVideoChromaSubsampling_Unknown = 0,
  274. MFVideoChromaSubsampling_ProgressiveChroma = 0x8,
  275. MFVideoChromaSubsampling_Horizontally_Cosited = 0x4,
  276. MFVideoChromaSubsampling_Vertically_Cosited = 0x2,
  277. MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
  278. MFVideoChromaSubsampling_MPEG2 = MFVideoChromaSubsampling_Horizontally_Cosited |
  279. MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
  280. MFVideoChromaSubsampling_MPEG1 = MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
  281. MFVideoChromaSubsampling_DV_PAL = MFVideoChromaSubsampling_Horizontally_Cosited |
  282. MFVideoChromaSubsampling_Vertically_Cosited,
  283. MFVideoChromaSubsampling_Cosited = MFVideoChromaSubsampling_Horizontally_Cosited |
  284. MFVideoChromaSubsampling_Vertically_Cosited |
  285. MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
  286. MFVideoChromaSubsampling_Last = MFVideoChromaSubsampling_Cosited+1,
  287. MFVideoChromaSubsampling_ForceDWORD = 0x7fffffff
  288. } MFVideoChromaSubsampling;
  289. cpp_quote("")
  290. typedef enum _MFNominalRange {
  291. MFNominalRange_Unknown = 0,
  292. MFNominalRange_Normal = 1,
  293. MFNominalRange_Wide = 2,
  294. MFNominalRange_0_255 = 1,
  295. MFNominalRange_16_235 = 2,
  296. MFNominalRange_48_208 = 3,
  297. MFNominalRange_64_127 = 4,
  298. MFNominalRange_Last,
  299. MFNominalRange_ForceDWORD = 0x7fffffff
  300. } MFNominalRange;
  301. cpp_quote("#endif")
  302. cpp_quote("")
  303. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  304. typedef enum _MFVideoFlags {
  305. MFVideoFlag_PAD_TO_Mask = 0x0001 | 0x0002,
  306. MFVideoFlag_PAD_TO_None = 0 *0x0001,
  307. MFVideoFlag_PAD_TO_4x3 = 1 *0x0001,
  308. MFVideoFlag_PAD_TO_16x9 = 2 *0x0001,
  309. MFVideoFlag_SrcContentHintMask = 0x0004 | 0x0008 | 0x0010,
  310. MFVideoFlag_SrcContentHintNone = 0 *0x0004,
  311. MFVideoFlag_SrcContentHint16x9 = 1 *0x0004,
  312. MFVideoFlag_SrcContentHint235_1 = 2 *0x0004,
  313. MFVideoFlag_AnalogProtected = 0x0020,
  314. MFVideoFlag_DigitallyProtected = 0x0040,
  315. MFVideoFlag_ProgressiveContent = 0x0080,
  316. MFVideoFlag_FieldRepeatCountMask = 0x0100 | 0x0200 | 0x0400,
  317. MFVideoFlag_FieldRepeatCountShift = 8,
  318. MFVideoFlag_ProgressiveSeqReset = 0x0800,
  319. MFVideoFlag_PanScanEnabled = 0x20000,
  320. MFVideoFlag_LowerFieldFirst = 0x40000,
  321. MFVideoFlag_BottomUpLinearRep = 0x80000,
  322. MFVideoFlags_DXVASurface = 0x100000,
  323. MFVideoFlags_RenderTargetSurface = 0x400000,
  324. MFVideoFlags_ForceQWORD = 0x7fffffff
  325. } MFVideoFlags;
  326. cpp_quote("#endif")
  327. cpp_quote("")
  328. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  329. typedef struct _MFRatio {
  330. DWORD Numerator;
  331. DWORD Denominator;
  332. } MFRatio;
  333. cpp_quote("")
  334. typedef struct _MFOffset {
  335. WORD fract;
  336. short value;
  337. } MFOffset;
  338. typedef struct _MFVideoArea {
  339. MFOffset OffsetX;
  340. MFOffset OffsetY;
  341. SIZE Area;
  342. } MFVideoArea;
  343. cpp_quote("#endif")
  344. cpp_quote("")
  345. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  346. typedef struct _MFVideoInfo {
  347. DWORD dwWidth;
  348. DWORD dwHeight;
  349. MFRatio PixelAspectRatio;
  350. MFVideoChromaSubsampling SourceChromaSubsampling;
  351. MFVideoInterlaceMode InterlaceMode;
  352. MFVideoTransferFunction TransferFunction;
  353. MFVideoPrimaries ColorPrimaries;
  354. MFVideoTransferMatrix TransferMatrix;
  355. MFVideoLighting SourceLighting;
  356. MFRatio FramesPerSecond;
  357. MFNominalRange NominalRange;
  358. MFVideoArea GeometricAperture;
  359. MFVideoArea MinimumDisplayAperture;
  360. MFVideoArea PanScanAperture;
  361. unsigned __int64 VideoFlags;
  362. } MFVideoInfo;
  363. cpp_quote("#endif")
  364. cpp_quote("")
  365. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  366. typedef struct __MFAYUVSample {
  367. BYTE bCrValue;
  368. BYTE bCbValue;
  369. BYTE bYValue;
  370. BYTE bSampleAlpha8;
  371. } MFAYUVSample;
  372. cpp_quote("")
  373. typedef struct _MFARGB {
  374. BYTE rgbBlue;
  375. BYTE rgbGreen;
  376. BYTE rgbRed;
  377. BYTE rgbAlpha;
  378. } MFARGB;
  379. cpp_quote("")
  380. typedef union _MFPaletteEntry {
  381. MFARGB ARGB;
  382. MFAYUVSample AYCbCr;
  383. } MFPaletteEntry;
  384. cpp_quote("#endif")
  385. cpp_quote("")
  386. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  387. typedef struct _MFVideoSurfaceInfo {
  388. DWORD Format;
  389. DWORD PaletteEntries;
  390. [size_is (PaletteEntries)] MFPaletteEntry Palette[];
  391. } MFVideoSurfaceInfo;
  392. cpp_quote("")
  393. typedef struct _MFVideoCompressedInfo {
  394. LONGLONG AvgBitrate;
  395. LONGLONG AvgBitErrorRate;
  396. DWORD MaxKeyFrameSpacing;
  397. } MFVideoCompressedInfo;
  398. cpp_quote("")
  399. typedef struct _MFVIDEOFORMAT {
  400. DWORD dwSize;
  401. MFVideoInfo videoInfo;
  402. GUID guidFormat;
  403. MFVideoCompressedInfo compressedInfo;
  404. MFVideoSurfaceInfo surfaceInfo;
  405. } MFVIDEOFORMAT;
  406. cpp_quote("")
  407. typedef enum _MFStandardVideoFormat {
  408. MFStdVideoFormat_reserved = 0,
  409. MFStdVideoFormat_NTSC,
  410. MFStdVideoFormat_PAL,
  411. MFStdVideoFormat_DVD_NTSC,
  412. MFStdVideoFormat_DVD_PAL,
  413. MFStdVideoFormat_DV_PAL,
  414. MFStdVideoFormat_DV_NTSC,
  415. MFStdVideoFormat_ATSC_SD480i,
  416. MFStdVideoFormat_ATSC_HD1080i,
  417. MFStdVideoFormat_ATSC_HD720p,
  418. } MFStandardVideoFormat;
  419. cpp_quote("#endif")
  420. cpp_quote("#endif")
  421. cpp_quote("")
  422. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  423. [object, uuid (b99f381f-a8f9-47a2-a5af-ca3a225a3890), local]
  424. interface IMFVideoMediaType : IMFMediaType {
  425. const MFVIDEOFORMAT *GetVideoFormat ();
  426. HRESULT GetVideoRepresentation ([in] GUID guidRepresentation,[out] LPVOID *ppvRepresentation,[in] LONG lStride);
  427. };
  428. cpp_quote("#endif")
  429. cpp_quote("")
  430. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  431. [object, uuid (ac6b7889-0740-4d51-8619-905994a55cc6)]
  432. interface IMFAsyncResult : IUnknown {
  433. HRESULT GetState ([out] IUnknown **ppunkState);
  434. HRESULT GetStatus ();
  435. HRESULT SetStatus ([in] HRESULT hrStatus);
  436. HRESULT GetObject ([out] IUnknown **ppObject);
  437. [local] IUnknown *GetStateNoAddRef ();
  438. };
  439. cpp_quote("")
  440. [object, uuid (a27003cf-2354-4f2a-8d6a-ab7cff15437e),]
  441. interface IMFAsyncCallback : IUnknown {
  442. HRESULT GetParameters ([out] DWORD *pdwFlags,[out] DWORD *pdwQueue);
  443. HRESULT Invoke ([in] IMFAsyncResult *pAsyncResult);
  444. }
  445. cpp_quote("#endif")
  446. cpp_quote("")
  447. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  448. [object, uuid (c7a4dca1-f5f0-47b6-b92b-bf0106d25791), local]
  449. interface IMFAsyncCallbackLogging : IMFAsyncCallback {
  450. void *GetObjectPointer ();
  451. DWORD GetObjectTag ();
  452. }
  453. cpp_quote("#endif")
  454. cpp_quote("")
  455. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  456. cpp_quote("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x00000001")
  457. cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x00000002")
  458. cpp_quote("#define MFASYNC_BLOCKING_CALLBACK 0x00000004")
  459. cpp_quote("#define MFASYNC_REPLY_CALLBACK 0x00000008")
  460. cpp_quote("#define MFASYNC_LOCALIZE_REMOTE_CALLBACK 0x00000010")
  461. cpp_quote("")
  462. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
  463. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
  464. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
  465. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
  466. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
  467. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_MULTITHREADED 0x00000005")
  468. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
  469. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xFFFF0000")
  470. cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xFFFFFFFF")
  471. cpp_quote("")
  472. enum {
  473. MEUnknown = 0,
  474. MEError = 1,
  475. MEExtendedType = 2,
  476. MENonFatalError = 3,
  477. MEGenericV1Anchor = MENonFatalError,
  478. MESessionUnknown = 100,
  479. MESessionTopologySet = 101,
  480. MESessionTopologiesCleared = 102,
  481. MESessionStarted = 103,
  482. MESessionPaused = 104,
  483. MESessionStopped = 105,
  484. MESessionClosed = 106,
  485. MESessionEnded = 107,
  486. MESessionRateChanged = 108,
  487. MESessionScrubSampleComplete = 109,
  488. MESessionCapabilitiesChanged = 110,
  489. MESessionTopologyStatus = 111,
  490. MESessionNotifyPresentationTime = 112,
  491. MENewPresentation = 113,
  492. MELicenseAcquisitionStart = 114,
  493. MELicenseAcquisitionCompleted = 115,
  494. MEIndividualizationStart = 116,
  495. MEIndividualizationCompleted = 117,
  496. MEEnablerProgress = 118,
  497. MEEnablerCompleted = 119,
  498. MEPolicyError = 120,
  499. MEPolicyReport = 121,
  500. MEBufferingStarted = 122,
  501. MEBufferingStopped = 123,
  502. MEConnectStart = 124,
  503. MEConnectEnd = 125,
  504. MEReconnectStart = 126,
  505. MEReconnectEnd = 127,
  506. MERendererEvent = 128,
  507. MESessionStreamSinkFormatChanged = 129,
  508. MESessionV1Anchor = MESessionStreamSinkFormatChanged,
  509. MESourceUnknown = 200,
  510. MESourceStarted = 201,
  511. MEStreamStarted = 202,
  512. MESourceSeeked = 203,
  513. MEStreamSeeked = 204,
  514. MENewStream = 205,
  515. MEUpdatedStream = 206,
  516. MESourceStopped = 207,
  517. MEStreamStopped = 208,
  518. MESourcePaused = 209,
  519. MEStreamPaused = 210,
  520. MEEndOfPresentation = 211,
  521. MEEndOfStream = 212,
  522. MEMediaSample = 213,
  523. MEStreamTick = 214,
  524. MEStreamThinMode = 215,
  525. MEStreamFormatChanged = 216,
  526. MESourceRateChanged = 217,
  527. MEEndOfPresentationSegment = 218,
  528. MESourceCharacteristicsChanged = 219,
  529. MESourceRateChangeRequested = 220,
  530. MESourceMetadataChanged = 221,
  531. MESequencerSourceTopologyUpdated = 222,
  532. MESourceV1Anchor = MESequencerSourceTopologyUpdated,
  533. MESinkUnknown = 300,
  534. MEStreamSinkStarted = 301,
  535. MEStreamSinkStopped = 302,
  536. MEStreamSinkPaused = 303,
  537. MEStreamSinkRateChanged = 304,
  538. MEStreamSinkRequestSample = 305,
  539. MEStreamSinkMarker = 306,
  540. MEStreamSinkPrerolled = 307,
  541. MEStreamSinkScrubSampleComplete = 308,
  542. MEStreamSinkFormatChanged = 309,
  543. MEStreamSinkDeviceChanged = 310,
  544. MEQualityNotify = 311,
  545. MESinkInvalidated = 312,
  546. MEAudioSessionNameChanged = 313,
  547. MEAudioSessionVolumeChanged = 314,
  548. MEAudioSessionDeviceRemoved = 315,
  549. MEAudioSessionServerShutdown = 316,
  550. MEAudioSessionGroupingParamChanged = 317,
  551. MEAudioSessionIconChanged = 318,
  552. MEAudioSessionFormatChanged = 319,
  553. MEAudioSessionDisconnected = 320,
  554. MEAudioSessionExclusiveModeOverride = 321,
  555. MESinkV1Anchor = MEAudioSessionExclusiveModeOverride,
  556. MECaptureAudioSessionVolumeChanged = 322,
  557. MECaptureAudioSessionDeviceRemoved = 323,
  558. MECaptureAudioSessionFormatChanged = 324,
  559. MECaptureAudioSessionDisconnected = 325,
  560. MECaptureAudioSessionExclusiveModeOverride = 326,
  561. MECaptureAudioSessionServerShutdown = 327,
  562. MESinkV2Anchor = MECaptureAudioSessionServerShutdown,
  563. METrustUnknown = 400,
  564. MEPolicyChanged = 401,
  565. MEContentProtectionMessage = 402,
  566. MEPolicySet = 403,
  567. METrustV1Anchor = MEPolicySet,
  568. MEWMDRMLicenseBackupCompleted = 500,
  569. MEWMDRMLicenseBackupProgress = 501,
  570. MEWMDRMLicenseRestoreCompleted = 502,
  571. MEWMDRMLicenseRestoreProgress = 503,
  572. MEWMDRMLicenseAcquisitionCompleted = 506,
  573. MEWMDRMIndividualizationCompleted = 508,
  574. MEWMDRMIndividualizationProgress = 513,
  575. MEWMDRMProximityCompleted = 514,
  576. MEWMDRMLicenseStoreCleaned = 515,
  577. MEWMDRMRevocationDownloadCompleted = 516,
  578. MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted,
  579. METransformUnknown = 600,
  580. METransformNeedInput,
  581. METransformHaveOutput,
  582. METransformDrainComplete,
  583. METransformMarker,
  584. METransformInputStreamStateChanged,
  585. MEByteStreamCharacteristicsChanged = 700,
  586. MEVideoCaptureDeviceRemoved = 800,
  587. MEVideoCaptureDevicePreempted = 801,
  588. MEStreamSinkFormatInvalidated = 802,
  589. MEEncodingParameters = 803,
  590. MEContentProtectionMetadata = 900,
  591. MEDeviceThermalStateChanged = 950,
  592. MEReservedMax = 10000
  593. };
  594. cpp_quote("")
  595. typedef DWORD MediaEventType;
  596. cpp_quote("")
  597. [object, uuid (DF598932-F10C-4e39-BBA2-C308F101DAA3)]
  598. interface IMFMediaEvent : IMFAttributes {
  599. HRESULT GetType ([out] MediaEventType *pmet);
  600. HRESULT GetExtendedType ([out] GUID *pguidExtendedType);
  601. HRESULT GetStatus ([out] HRESULT *phrStatus);
  602. HRESULT GetValue ([out] PROPVARIANT *pvValue);
  603. }
  604. cpp_quote("")
  605. cpp_quote("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
  606. cpp_quote("")
  607. interface IMFRemoteAsyncCallback;
  608. cpp_quote("")
  609. [object, uuid (2cd0bd52-BCD5-4b89-B62C-EADC0C031E7D)]
  610. interface IMFMediaEventGenerator : IUnknown {
  611. HRESULT GetEvent ([in] DWORD dwFlags,[out] IMFMediaEvent **ppEvent);
  612. [local] HRESULT BeginGetEvent ([in] IMFAsyncCallback *pCallback,[in] IUnknown *punkState);
  613. [call_as (BeginGetEvent)] HRESULT RemoteBeginGetEvent ([in] IMFRemoteAsyncCallback *pCallback);
  614. [local] HRESULT EndGetEvent ([in] IMFAsyncResult *pResult,[out] IMFMediaEvent **ppEvent);
  615. [call_as (EndGetEvent)] HRESULT RemoteEndGetEvent ([in] IUnknown *pResult,[out] DWORD *pcbEvent,[out, size_is (,*pcbEvent)] BYTE **ppbEvent);
  616. HRESULT QueueEvent ([in] MediaEventType met,[in] REFGUID guidExtendedType,[in] HRESULT hrStatus,[in, unique] const PROPVARIANT *pvValue);
  617. }
  618. cpp_quote("#endif")
  619. cpp_quote("")
  620. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  621. [object, uuid (a27003d0-2354-4f2a-8d6a-ab7cff15437e),]
  622. interface IMFRemoteAsyncCallback : IUnknown {
  623. HRESULT Invoke ([in] HRESULT hr,[in] IUnknown *pRemoteResult);
  624. };
  625. cpp_quote("#endif")
  626. cpp_quote("")
  627. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  628. cpp_quote("")
  629. typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
  630. msoBegin,
  631. msoCurrent
  632. } MFBYTESTREAM_SEEK_ORIGIN;
  633. cpp_quote("")
  634. [object, uuid (ad4c1b00-4bf7-422f-9175-756693d9130d),]
  635. interface IMFByteStream : IUnknown {
  636. HRESULT GetCapabilities ([out] DWORD *pdwCapabilities);
  637. HRESULT GetLength ([out] QWORD *pqwLength);
  638. HRESULT SetLength ([in] QWORD qwLength);
  639. HRESULT GetCurrentPosition ([out] QWORD *pqwPosition);
  640. HRESULT SetCurrentPosition ([in] QWORD qwPosition);
  641. HRESULT IsEndOfStream ([out] WINBOOL *pfEndOfStream);
  642. HRESULT Read ([out, size_is (cb)] BYTE *pb,[in] ULONG cb,[out] ULONG *pcbRead);
  643. [local] HRESULT BeginRead ([out] BYTE *pb,[in] ULONG cb,[in] IMFAsyncCallback *pCallback,[in] IUnknown *punkState);
  644. [call_as (BeginRead)] HRESULT RemoteBeginRead ([in] ULONG cb,[in] IMFRemoteAsyncCallback *pCallback);
  645. [local] HRESULT EndRead ([in] IMFAsyncResult *pResult,[out] ULONG *pcbRead);
  646. [call_as (EndRead)] HRESULT RemoteEndRead ([in] IUnknown *punkResult,[out, size_is (cb)] BYTE *pb,[in] ULONG cb,[out] ULONG *pcbRead);
  647. HRESULT Write ([in, size_is (cb)] const BYTE *pb,[in] ULONG cb,[out] ULONG *pcbWritten);
  648. [local] HRESULT BeginWrite ([in] const BYTE *pb,[in] ULONG cb,[in] IMFAsyncCallback *pCallback,[in] IUnknown *punkState);
  649. [call_as (BeginWrite)] HRESULT RemoteBeginWrite ([in, size_is (cb)] const BYTE *pb,[in] ULONG cb,[in] IMFRemoteAsyncCallback *pCallback);
  650. [local] HRESULT EndWrite ([in] IMFAsyncResult *pResult,[out] ULONG *pcbWritten);
  651. [call_as (EndWrite)] HRESULT RemoteEndWrite ([in] IUnknown *punkResult,[out] ULONG *pcbWritten);
  652. HRESULT Seek ([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin,[in] LONGLONG llSeekOffset,[in] DWORD dwSeekFlags,[out] QWORD *pqwCurrentPosition);
  653. HRESULT Flush ();
  654. HRESULT Close ();
  655. };
  656. cpp_quote("")
  657. cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
  658. cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
  659. cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
  660. cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
  661. cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
  662. cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
  663. cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
  664. cpp_quote("#if WINVER >= _WIN32_WINNT_WIN7")
  665. cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
  666. cpp_quote("#endif")
  667. cpp_quote("#if WINVER >= _WIN32_WINNT_WIN8")
  668. cpp_quote("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
  669. cpp_quote("#endif")
  670. cpp_quote("")
  671. cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
  672. cpp_quote("")
  673. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  674. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  675. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_DURATION, 0xfc35828a, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  676. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  677. cpp_quote("#if (WINVER >= _WIN32_WINNT_WIN7)")
  678. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  679. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d, 0x3cb6, 0x460c, 0xa4, 0x24, 0xb6, 0x68, 0x12, 0x60, 0x37, 0x5a);")
  680. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_EFFECTIVE_URL, 0x9afa0209, 0x89d1, 0x42af, 0x84, 0x56, 0x1d, 0xe6, 0xb5, 0x62, 0xd6, 0x91);")
  681. cpp_quote("EXTERN_GUID( MF_BYTESTREAM_TRANSCODED, 0xb6c5c282, 0x4dc9, 0x4db9, 0xab, 0x48, 0xcf, 0x3b, 0x6d, 0x8b, 0xc5, 0xe0 );")
  682. cpp_quote("#endif")
  683. cpp_quote("#endif")
  684. cpp_quote("")
  685. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  686. cpp_quote("EXTERN_GUID(CLSID_MFByteStreamProxyClassFactory, 0x770e8e77, 0x4916, 0x441c, 0xa9, 0xa7, 0xb3, 0x42, 0xd0, 0xee, 0xbc, 0x71 );")
  687. cpp_quote("")
  688. [object, uuid (a6b43f84-5c0a-42e8-a44d-b1857a76992f)]
  689. interface IMFByteStreamProxyClassFactory : IUnknown {
  690. HRESULT CreateByteStreamProxy ([in] IMFByteStream *pByteStream,[in, unique] IMFAttributes *pAttributes,[in] REFIID riid,[out, iid_is (riid)] LPVOID *ppvObject);
  691. };
  692. cpp_quote("")
  693. typedef enum {
  694. MF_ACCESSMODE_READ = 1,
  695. MF_ACCESSMODE_WRITE = 2,
  696. MF_ACCESSMODE_READWRITE = 3
  697. } MF_FILE_ACCESSMODE;
  698. cpp_quote("")
  699. typedef enum {
  700. MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
  701. MF_OPENMODE_FAIL_IF_EXIST = 1,
  702. MF_OPENMODE_RESET_IF_EXIST = 2,
  703. MF_OPENMODE_APPEND_IF_EXIST = 3,
  704. MF_OPENMODE_DELETE_IF_EXIST = 4
  705. } MF_FILE_OPENMODE;
  706. cpp_quote("")
  707. typedef enum {
  708. MF_FILEFLAGS_NONE = 0x00000000,
  709. MF_FILEFLAGS_NOBUFFERING = 0x00000001,
  710. MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
  711. } MF_FILE_FLAGS;
  712. cpp_quote("#endif")
  713. cpp_quote("")
  714. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  715. [object, uuid (8feed468-6f7e-440d-869a-49bdd283ad0d),]
  716. interface IMFSampleOutputStream : IUnknown {
  717. HRESULT BeginWriteSample ([in] IMFSample *pSample,[in] IMFAsyncCallback *pCallback,[in] IUnknown *punkState);
  718. HRESULT EndWriteSample ([in] IMFAsyncResult *pResult);
  719. HRESULT Close ();
  720. };
  721. cpp_quote("")
  722. [object, uuid (5bc8a76b-869a-46a3-9b03-FA218A66AEBE)]
  723. interface IMFCollection : IUnknown {
  724. HRESULT GetElementCount ([out] DWORD *pcElements);
  725. HRESULT GetElement ([in] DWORD dwElementIndex,[out] IUnknown **ppUnkElement);
  726. HRESULT AddElement ([in] IUnknown *pUnkElement);
  727. HRESULT RemoveElement ([in] DWORD dwElementIndex,[out] IUnknown **ppUnkElement);
  728. HRESULT InsertElementAt ([in] DWORD dwIndex,[in]IUnknown *pUnknown);
  729. HRESULT RemoveAllElements ();
  730. }
  731. cpp_quote("")
  732. [object, uuid (36f846fc-2256-48b6-b58e-e2b638316581), local]
  733. interface IMFMediaEventQueue : IUnknown {
  734. HRESULT GetEvent ([in] DWORD dwFlags,[out] IMFMediaEvent **ppEvent);
  735. HRESULT BeginGetEvent ([in] IMFAsyncCallback *pCallback,[in] IUnknown *punkState);
  736. HRESULT EndGetEvent ([in] IMFAsyncResult *pResult,[out] IMFMediaEvent **ppEvent);
  737. HRESULT QueueEvent ([in] IMFMediaEvent *pEvent);
  738. HRESULT QueueEventParamVar ([in] MediaEventType met,[in] REFGUID guidExtendedType,[in] HRESULT hrStatus,[in, unique] const PROPVARIANT *pvValue);
  739. HRESULT QueueEventParamUnk ([in] MediaEventType met,[in] REFGUID guidExtendedType,[in] HRESULT hrStatus,[in, unique] IUnknown *pUnk);
  740. HRESULT Shutdown ();
  741. }
  742. cpp_quote("")
  743. [object, uuid (7fee9e9a-4a89-47a6-899c-B6A53A70FB67), helpstring ("IMFActivate Interface"), pointer_default (unique)]
  744. interface IMFActivate : IMFAttributes {
  745. HRESULT ActivateObject ([in] REFIID riid,[out, iid_is (riid), retval] void **ppv);
  746. HRESULT ShutdownObject ();
  747. HRESULT DetachObject ();
  748. };
  749. cpp_quote("#endif")
  750. cpp_quote("")
  751. cpp_quote("#if WINVER >= _WIN32_WINNT_WIN7")
  752. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  753. typedef enum _MF_Plugin_Type {
  754. MF_Plugin_Type_MFT = 0,
  755. MF_Plugin_Type_MediaSource = 1,
  756. MF_Plugin_Type_MFT_MatchOutputType = 2,
  757. MF_Plugin_Type_Other = (DWORD)-1,
  758. } MF_Plugin_Type;
  759. cpp_quote("")
  760. [object, local, uuid (5c6c44bf-1db6-435b-9249-e8cd10fdec96), helpstring ("IMFPluginControl Interface"), pointer_default (unique)]
  761. interface IMFPluginControl : IUnknown {
  762. HRESULT GetPreferredClsid (DWORD pluginType, LPCWSTR selector, CLSID *clsid);
  763. HRESULT GetPreferredClsidByIndex (DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
  764. HRESULT SetPreferredClsid (DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
  765. HRESULT IsDisabled (DWORD pluginType, REFCLSID clsid);
  766. HRESULT GetDisabledByIndex (DWORD pluginType, DWORD index, CLSID *clsid);
  767. HRESULT SetDisabled (DWORD pluginType, REFCLSID clsid, WINBOOL disabled);
  768. }
  769. cpp_quote("")
  770. typedef enum MF_PLUGIN_CONTROL_POLICY {
  771. MF_PLUGIN_CONTROL_POLICY_USE_ALL_PLUGINS = 0,
  772. MF_PLUGIN_CONTROL_POLICY_USE_APPROVED_PLUGINS = 1,
  773. MF_PLUGIN_CONTROL_POLICY_USE_WEB_PLUGINS = 2,
  774. MF_PLUGIN_CONTROL_POLICY_USE_WEB_PLUGINS_EDGEMODE = 3
  775. } MF_PLUGIN_CONTROL_POLICY;
  776. cpp_quote("")
  777. [object, local, uuid (C6982083-3ddc-45cb-AF5E-0f7a8ce4de77), helpstring ("IMFPluginControl2 Interface"), pointer_default (unique)]
  778. interface IMFPluginControl2 : IMFPluginControl {
  779. HRESULT SetPolicy ([in] MF_PLUGIN_CONTROL_POLICY policy);
  780. }
  781. cpp_quote("#endif")
  782. cpp_quote("")
  783. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  784. [object, local, uuid (eb533d5d-2db6-40f8-97a9-494692014f07), helpstring ("IMFDXGIDeviceManager Interface"), pointer_default (unique)]
  785. interface IMFDXGIDeviceManager : IUnknown {
  786. HRESULT CloseDeviceHandle (HANDLE hDevice);
  787. HRESULT GetVideoService (HANDLE hDevice, REFIID riid, void **ppService);
  788. HRESULT LockDevice (HANDLE hDevice, REFIID riid, void **ppUnkDevice, WINBOOL fBlock);
  789. HRESULT OpenDeviceHandle (HANDLE *phDevice);
  790. HRESULT ResetDevice (IUnknown *pUnkDevice, UINT resetToken);
  791. HRESULT TestDevice (HANDLE hDevice);
  792. HRESULT UnlockDevice (HANDLE hDevice, WINBOOL fSaveState);
  793. }
  794. cpp_quote("")
  795. typedef enum _MF_STREAM_STATE {
  796. MF_STREAM_STATE_STOPPED = 0,
  797. MF_STREAM_STATE_PAUSED,
  798. MF_STREAM_STATE_RUNNING
  799. } MF_STREAM_STATE;
  800. cpp_quote("#endif")
  801. cpp_quote("")
  802. cpp_quote("#endif")
  803. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  804. cpp_quote("#if NTDDI_VERSION >= NTDDI_WIN10_RS2")
  805. cpp_quote("")
  806. [object, local, uuid(ce8bd576-e440-43b3-be34-1e53f565f7e8), helpstring("IMFMuxStreamAttributesManager Interface"), pointer_default(unique)]
  807. interface IMFMuxStreamAttributesManager : IUnknown {
  808. HRESULT GetStreamCount (DWORD *pdwMuxStreamCount);
  809. HRESULT GetAttributes (DWORD dwMuxStreamIndex, IMFAttributes **ppStreamAttributes);
  810. }
  811. cpp_quote("")
  812. [object, local, uuid(505a2c72-42f7-4690-aeab-8f513d0ffdb8), helpstring("IMFMuxStreamMediaTypeManager Interface"), pointer_default(unique)]
  813. interface IMFMuxStreamMediaTypeManager : IUnknown {
  814. HRESULT GetStreamCount (DWORD *pdwMuxStreamCount);
  815. HRESULT GetMediaType (DWORD dwMuxStreamIndex, IMFMediaType **ppMediaType);
  816. HRESULT GetStreamConfigurationCount (DWORD *pdwCount);
  817. HRESULT AddStreamConfiguration (ULONGLONG ullStreamMask);
  818. HRESULT RemoveStreamConfiguration (ULONGLONG ullStreamMask);
  819. HRESULT GetStreamConfiguration (DWORD ulIndex, ULONGLONG *pullStreamMask);
  820. }
  821. cpp_quote("")
  822. [object, local, uuid(74abbc19-b1cc-4e41-bb8b-9d9b86a8f6ca), helpstring("IMFMuxStreamSampleManager Interface"), pointer_default(unique)]
  823. interface IMFMuxStreamSampleManager : IUnknown {
  824. HRESULT GetStreamCount (DWORD *pdwMuxStreamCount);
  825. HRESULT GetSample (DWORD dwMuxStreamIndex, IMFSample **ppSample);
  826. ULONGLONG GetStreamConfiguration ();
  827. }
  828. cpp_quote("#endif")
  829. cpp_quote("#endif")