mscvpdb.h: Move parsing definitions to dbghelp.
[wine.git] / include / mfobjects.idl
blobb2d0e5d06ecbc666141a6b1de86a877ddf3c76c6
1 /*
2 * Copyright 2015 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "unknwn.idl";
20 import "propsys.idl";
21 import "mediaobj.idl";
23 cpp_quote("#include <mmreg.h>")
24 #include <mmreg.h>
26 typedef ULONGLONG QWORD;
28 typedef enum _MF_ATTRIBUTE_TYPE {
29 MF_ATTRIBUTE_UINT32 = VT_UI4,
30 MF_ATTRIBUTE_UINT64 = VT_UI8,
31 MF_ATTRIBUTE_DOUBLE = VT_R8,
32 MF_ATTRIBUTE_GUID = VT_CLSID,
33 MF_ATTRIBUTE_STRING = VT_LPWSTR,
34 MF_ATTRIBUTE_BLOB = VT_VECTOR | VT_UI1,
35 MF_ATTRIBUTE_IUNKNOWN = VT_UNKNOWN
36 } MF_ATTRIBUTE_TYPE;
38 typedef enum _MF_ATTRIBUTES_MATCH_TYPE {
39 MF_ATTRIBUTES_MATCH_OUR_ITEMS = 0,
40 MF_ATTRIBUTES_MATCH_THEIR_ITEMS = 1,
41 MF_ATTRIBUTES_MATCH_ALL_ITEMS = 2,
42 MF_ATTRIBUTES_MATCH_INTERSECTION = 3,
43 MF_ATTRIBUTES_MATCH_SMALLER = 4
44 } MF_ATTRIBUTES_MATCH_TYPE;
47 object,
48 uuid(2cd2d921-c447-44a7-a13c-4adabfc247e3)
50 interface IMFAttributes : IUnknown
52 HRESULT GetItem(REFGUID guidKey, [in, out, ptr] PROPVARIANT *pValue);
53 HRESULT GetItemType(REFGUID guidKey, [out] MF_ATTRIBUTE_TYPE *pType);
54 HRESULT CompareItem(REFGUID guidKey, REFPROPVARIANT Value, [out] BOOL *pbResult);
55 HRESULT Compare(IMFAttributes *pTheirs, MF_ATTRIBUTES_MATCH_TYPE MatchType, [out] BOOL *pbResult);
56 HRESULT GetUINT32(REFGUID guidKey, [out] UINT32 *punValue);
57 HRESULT GetUINT64(REFGUID guidKey, [out] UINT64 *punValue);
58 HRESULT GetDouble(REFGUID guidKey, [out] double *pfValue);
59 HRESULT GetGUID(REFGUID guidKey, [out] GUID *pguidValue);
60 HRESULT GetStringLength(REFGUID guidKey, [out] UINT32 *pcchLength);
61 HRESULT GetString(REFGUID guidKey, [out, size_is(cchBufSize)] LPWSTR pwszValue, UINT32 cchBufSize,
62 [in, out, ptr] UINT32 *pcchLength);
63 HRESULT GetAllocatedString(REFGUID guidKey, [out, size_is(,*pcchLength+1)] LPWSTR *ppwszValue,
64 [out] UINT32 *pcchLength);
65 HRESULT GetBlobSize(REFGUID guidKey, [out] UINT32 *pcbBlobSize);
66 HRESULT GetBlob(REFGUID guidKey, [out, size_is(cbBufSize)] UINT8 *pBuf, UINT32 cbBufSize,
67 [in, out, ptr] UINT32 *pcbBlobSize);
68 HRESULT GetAllocatedBlob(REFGUID guidKey, [out, size_is(,*pcbSize)] UINT8 **ppBuf, [out] UINT32 *pcbSize);
69 HRESULT GetUnknown(REFGUID guidKey, REFIID riid, [out, iid_is(riid)] LPVOID *ppv);
70 HRESULT SetItem(REFGUID guidKey, REFPROPVARIANT Value);
71 HRESULT DeleteItem(REFGUID guidKey);
72 HRESULT DeleteAllItems();
73 HRESULT SetUINT32(REFGUID guidKey, UINT32 unValue);
74 HRESULT SetUINT64(REFGUID guidKey, UINT64 unValue);
75 HRESULT SetDouble(REFGUID guidKey, double fValue);
76 HRESULT SetGUID(REFGUID guidKey, REFGUID guidValue);
77 HRESULT SetString(REFGUID guidKey, [in, string] LPCWSTR wszValue);
78 HRESULT SetBlob(REFGUID guidKey, [in, size_is(cbBufSize)] const UINT8* pBuf, UINT32 cbBufSize);
79 HRESULT SetUnknown(REFGUID guidKey, [in] IUnknown *pUnknown);
80 HRESULT LockStore();
81 HRESULT UnlockStore();
82 HRESULT GetCount([out] UINT32 *pcItems);
83 HRESULT GetItemByIndex(UINT32 unIndex, [out] GUID *pguidKey, [in, out, ptr] PROPVARIANT *pValue);
84 HRESULT CopyAllItems([in] IMFAttributes *pDest);
87 enum MF_ATTRIBUTE_SERIALIZE_OPTIONS {
88 MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF = 0x00000001
92 object,
93 uuid(045fa593-8799-42b8-bc8d-8968c6453507),
94 local
96 interface IMFMediaBuffer : IUnknown
98 HRESULT Lock([out] BYTE **ppbBuffer, [out] DWORD *pcbMaxLength, [out] DWORD *pcbCurrentLength);
99 HRESULT Unlock();
100 HRESULT GetCurrentLength([out] DWORD *pcbCurrentLength);
101 HRESULT SetCurrentLength([in] DWORD cbCurrentLength);
102 HRESULT GetMaxLength([out] DWORD *pcbMaxLength);
106 object,
107 uuid(c40a00f2-b93a-4d80-ae8c-5a1c634f58e4),
108 local
110 interface IMFSample : IMFAttributes
112 HRESULT GetSampleFlags([out] DWORD *pdwSampleFlags);
113 HRESULT SetSampleFlags([in] DWORD dwSampleFlags);
114 HRESULT GetSampleTime([out] LONGLONG *phnsSampleTime);
115 HRESULT SetSampleTime([in] LONGLONG hnsSampleTime);
116 HRESULT GetSampleDuration([out] LONGLONG *phnsSampleDuration);
117 HRESULT SetSampleDuration([in] LONGLONG hnsSampleDuration);
118 HRESULT GetBufferCount([out] DWORD *pdwBufferCount);
119 HRESULT GetBufferByIndex([in] DWORD dwIndex, [out] IMFMediaBuffer **ppBuffer);
120 HRESULT ConvertToContiguousBuffer([out] IMFMediaBuffer **ppBuffer);
121 HRESULT AddBuffer([in] IMFMediaBuffer *pBuffer);
122 HRESULT RemoveBufferByIndex([in] DWORD dwIndex);
123 HRESULT RemoveAllBuffers();
124 HRESULT GetTotalLength([out] DWORD *pcbTotalLength);
125 HRESULT CopyToBuffer([in] IMFMediaBuffer *pBuffer);
129 object,
130 uuid(7dc9d5f9-9ed9-44ec-9bbf-0600bb589fbb),
131 local
133 interface IMF2DBuffer : IUnknown
135 HRESULT Lock2D([out] BYTE **pbScanline0, [out] LONG *plPitch);
136 HRESULT Unlock2D();
137 HRESULT GetScanline0AndPitch([out] BYTE **pbScanline0, [out] LONG *plPitch);
138 HRESULT IsContiguousFormat([out] BOOL *pfIsContiguous);
139 HRESULT GetContiguousLength([out] DWORD *pcbLength);
140 HRESULT ContiguousCopyTo([out, size_is(cbDestBuffer)] BYTE *pbDestBuffer, [in] DWORD cbDestBuffer);
141 HRESULT ContiguousCopyFrom([in, size_is(cbSrcBuffer)] const BYTE *pbSrcBuffer, [in] DWORD cbSrcBuffer);
144 typedef enum _MF2DBuffer_LockFlags
146 MF2DBuffer_LockFlags_LockTypeMask = 0x1 | 0x2 | 0x3,
147 MF2DBuffer_LockFlags_Read = 0x1,
148 MF2DBuffer_LockFlags_Write = 0x2,
149 MF2DBuffer_LockFlags_ReadWrite = 0x3,
150 MF2DBuffer_LockFlags_ForceDWORD = 0x7fffffff
151 } MF2DBuffer_LockFlags;
154 object,
155 uuid(33ae5ea6-4316-436f-8ddd-d73d22f829ec),
156 local
158 interface IMF2DBuffer2 : IMF2DBuffer
160 HRESULT Lock2DSize(
161 [in] MF2DBuffer_LockFlags flags,
162 [out] BYTE **scanline0,
163 [out] LONG *pitch,
164 [out] BYTE **buffer_start,
165 [out] DWORD *buffer_length);
167 HRESULT Copy2DTo([in] IMF2DBuffer2 *dest_buffer);
171 object,
172 uuid(e7174cfa-1c9e-48b1-8866-626226bfc258),
173 local
175 interface IMFDXGIBuffer : IUnknown
177 HRESULT GetResource(
178 [in] REFIID riid,
179 [out] void **object
182 HRESULT GetSubresourceIndex(
183 [out] UINT *index
186 HRESULT GetUnknown(
187 [in] REFIID guid,
188 [in] REFIID riid,
189 [out] void **object
192 HRESULT SetUnknown(
193 [in] REFIID guid,
194 [in] IUnknown *data
199 object,
200 uuid(44ae0fa8-ea31-4109-8d2e-4cae4997c555),
201 local
203 interface IMFMediaType : IMFAttributes
205 HRESULT GetMajorType([out] GUID *pguidMajorType);
206 HRESULT IsCompressedFormat([out] BOOL *pfCompressed);
207 HRESULT IsEqual([in] IMFMediaType *pIMediaType, [out] DWORD *pdwFlags);
208 HRESULT GetRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation);
209 HRESULT FreeRepresentation([in] GUID guidRepresentation, [in] LPVOID pvRepresentation);
212 cpp_quote("#define MF_MEDIATYPE_EQUAL_MAJOR_TYPES 0x00000001")
213 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_TYPES 0x00000002")
214 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_DATA 0x00000004")
215 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA 0x00000008")
218 object,
219 uuid(26a0adc3-ce26-4672-9304-69552edd3faf),
220 local
222 interface IMFAudioMediaType : IMFMediaType
224 const WAVEFORMATEX *GetAudioFormat();
227 typedef struct {
228 GUID guidMajorType;
229 GUID guidSubtype;
230 } MFT_REGISTER_TYPE_INFO;
232 typedef enum _MFVideoFlags {
233 MFVideoFlag_PAD_TO_Mask = 0x00000003,
234 MFVideoFlag_PAD_TO_None = 0,
235 MFVideoFlag_PAD_TO_4x3 = 0x00000001,
236 MFVideoFlag_PAD_TO_16x9 = 0x00000002,
237 MFVideoFlag_SrcContentHintMask = 0x0000001c,
238 MFVideoFlag_SrcContentHintNone = 0,
239 MFVideoFlag_SrcContentHint16x9 = 0x00000004,
240 MFVideoFlag_SrcContentHint235_1 = 0x00000008,
241 MFVideoFlag_AnalogProtected = 0x00000020,
242 MFVideoFlag_DigitallyProtected = 0x00000040,
243 MFVideoFlag_ProgressiveContent = 0x00000080,
244 MFVideoFlag_FieldRepeatCountMask = 0x00000700,
245 MFVideoFlag_FieldRepeatCountShift = 8,
246 MFVideoFlag_ProgressiveSeqReset = 0x00000800,
247 MFVideoFlag_PanScanEnabled = 0x00020000,
248 MFVideoFlag_LowerFieldFirst = 0x00040000,
249 MFVideoFlag_BottomUpLinearRep = 0x00080000,
250 MFVideoFlags_DXVASurface = 0x00100000,
251 MFVideoFlags_RenderTargetSurface = 0x00400000,
252 MFVideoFlags_ForceQWORD = 0x7fffffff
253 } MFVideoFlags;
255 typedef struct _MFRatio {
256 DWORD Numerator;
257 DWORD Denominator;
258 } MFRatio;
260 typedef struct _MFOffset {
261 WORD fract;
262 short value;
263 } MFOffset;
265 typedef struct _MFVideoArea {
266 MFOffset OffsetX;
267 MFOffset OffsetY;
268 SIZE Area;
269 } MFVideoArea;
271 typedef enum _MFVideoChromaSubsampling {
272 MFVideoChromaSubsampling_Unknown = 0,
273 MFVideoChromaSubsampling_ProgressiveChroma = 0x8,
274 MFVideoChromaSubsampling_Horizontally_Cosited = 0x4,
275 MFVideoChromaSubsampling_Vertically_Cosited = 0x2,
276 MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
277 MFVideoChromaSubsampling_MPEG2
278 = MFVideoChromaSubsampling_Horizontally_Cosited
279 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
280 MFVideoChromaSubsampling_MPEG1
281 = MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
282 MFVideoChromaSubsampling_DV_PAL
283 = MFVideoChromaSubsampling_Horizontally_Cosited
284 | MFVideoChromaSubsampling_Vertically_Cosited,
285 MFVideoChromaSubsampling_Cosited
286 = MFVideoChromaSubsampling_Horizontally_Cosited
287 | MFVideoChromaSubsampling_Vertically_Cosited
288 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
289 MFVideoChromaSubsampling_Last = MFVideoChromaSubsampling_Cosited + 1,
290 MFVideoChromaSubsampling_ForceDWORD = 0x7fffffff
291 } MFVideoChromaSubsampling;
293 typedef enum _MFVideoInterlaceMode {
294 MFVideoInterlace_Unknown = 0,
295 MFVideoInterlace_Progressive = 2,
296 MFVideoInterlace_FieldInterleavedUpperFirst = 3,
297 MFVideoInterlace_FieldInterleavedLowerFirst = 4,
298 MFVideoInterlace_FieldSingleUpper = 5,
299 MFVideoInterlace_FieldSingleLower = 6,
300 MFVideoInterlace_MixedInterlaceOrProgressive = 7,
301 MFVideoInterlace_Last,
302 MFVideoInterlace_ForceDWORD = 0x7fffffff
303 } MFVideoInterlaceMode;
305 typedef enum _MFVideoTransferFunction {
306 MFVideoTransFunc_Unknown = 0,
307 MFVideoTransFunc_10 = 1,
308 MFVideoTransFunc_18 = 2,
309 MFVideoTransFunc_20 = 3,
310 MFVideoTransFunc_22 = 4,
311 MFVideoTransFunc_709 = 5,
312 MFVideoTransFunc_240M = 6,
313 MFVideoTransFunc_sRGB = 7,
314 MFVideoTransFunc_28 = 8,
315 MFVideoTransFunc_Log_100 = 9,
316 MFVideoTransFunc_Log_316 = 10,
317 MFVideoTransFunc_709_sym = 11,
318 MFVideoTransFunc_Last,
319 MFVideoTransFunc_ForceDWORD = 0x7fffffff
320 } MFVideoTransferFunction;
322 typedef enum _MFVideoTransferMatrix {
323 MFVideoTransferMatrix_Unknown = 0,
324 MFVideoTransferMatrix_BT709 = 1,
325 MFVideoTransferMatrix_BT601 = 2,
326 MFVideoTransferMatrix_SMPTE240M = 3,
327 MFVideoTransferMatrix_BT2020_10 = 4,
328 MFVideoTransferMatrix_BT2020_12 = 5,
329 MFVideoTransferMatrix_Last,
330 MFVideoTransferMatrix_ForceDWORD = 0x7fffffff
331 } MFVideoTransferMatrix;
333 typedef enum _MFVideoPrimaries {
334 MFVideoPrimaries_Unknown = 0,
335 MFVideoPrimaries_reserved = 1,
336 MFVideoPrimaries_BT709 = 2,
337 MFVideoPrimaries_BT470_2_SysM = 3,
338 MFVideoPrimaries_BT470_2_SysBG = 4,
339 MFVideoPrimaries_SMPTE170M = 5,
340 MFVideoPrimaries_SMPTE240M = 6,
341 MFVideoPrimaries_EBU3213 = 7,
342 MFVideoPrimaries_SMPTE_C = 8,
343 MFVideoPrimaries_Last,
344 MFVideoPrimaries_ForceDWORD = 0x7fffffff
345 } MFVideoPrimaries;
347 typedef enum _MFVideoLighting {
348 MFVideoLighting_Unknown = 0,
349 MFVideoLighting_bright = 1,
350 MFVideoLighting_office = 2,
351 MFVideoLighting_dim = 3,
352 MFVideoLighting_dark = 4,
353 MFVideoLighting_Last,
354 MFVideoLighting_ForceDWORD = 0x7fffffff
355 } MFVideoLighting;
357 typedef enum _MFNominalRange {
358 MFNominalRange_Unknown = 0,
359 MFNominalRange_Normal = 1,
360 MFNominalRange_Wide = 2,
361 MFNominalRange_0_255 = 1,
362 MFNominalRange_16_235 = 2,
363 MFNominalRange_48_208 = 3,
364 MFNominalRange_64_127 = 4
365 } MFNominalRange;
367 typedef struct _MFVideoInfo {
368 DWORD dwWidth;
369 DWORD dwHeight;
370 MFRatio PixelAspectRatio;
371 MFVideoChromaSubsampling SourceChromaSubsampling;
372 MFVideoInterlaceMode InterlaceMode;
373 MFVideoTransferFunction TransferFunction;
374 MFVideoPrimaries ColorPrimaries;
375 MFVideoTransferMatrix TransferMatrix;
376 MFVideoLighting SourceLighting;
377 MFRatio FramesPerSecond;
378 MFNominalRange NominalRange;
379 MFVideoArea GeometricAperture;
380 MFVideoArea MinimumDisplayAperture;
381 MFVideoArea PanScanAperture;
382 unsigned __int64 VideoFlags;
383 } MFVideoInfo;
385 typedef struct _MFVideoCompressedInfo {
386 LONGLONG AvgBitrate;
387 LONGLONG AvgBitErrorRate;
388 DWORD MaxKeyFrameSpacing;
389 } MFVideoCompressedInfo;
391 typedef struct _MFARGB {
392 BYTE rgbBlue;
393 BYTE rgbGreen;
394 BYTE rgbRed;
395 BYTE rgbAlpha;
396 } MFARGB;
398 typedef struct __MFAYUVSample {
399 BYTE bCrValue;
400 BYTE bCbValue;
401 BYTE bYValue;
402 BYTE bSampleAlpha8;
403 } MFAYUVSample;
405 typedef union _MFPaletteEntry {
406 MFARGB ARGB;
407 MFAYUVSample AYCbCr;
408 } MFPaletteEntry;
410 typedef struct _MFVideoSurfaceInfo {
411 DWORD Format;
412 DWORD PaletteEntries;
413 MFPaletteEntry Palette[];
414 } MFVideoSurfaceInfo;
416 typedef struct _MFVIDEOFORMAT {
417 DWORD dwSize;
418 MFVideoInfo videoInfo;
419 GUID guidFormat;
420 MFVideoCompressedInfo compressedInfo;
421 MFVideoSurfaceInfo surfaceInfo;
422 } MFVIDEOFORMAT;
424 typedef enum _MFStandardVideoFormat {
425 MFStdVideoFormat_reserved = 0,
426 MFStdVideoFormat_NTSC,
427 MFStdVideoFormat_PAL,
428 MFStdVideoFormat_DVD_NTSC,
429 MFStdVideoFormat_DVD_PAL,
430 MFStdVideoFormat_DV_PAL,
431 MFStdVideoFormat_DV_NTSC,
432 MFStdVideoFormat_ATSC_SD480i,
433 MFStdVideoFormat_ATSC_HD1080i,
434 MFStdVideoFormat_ATSC_HD720p
435 } MFStandardVideoFormat;
438 object,
439 uuid(b99f381f-a8f9-47a2-a5af-ca3a225a3890),
440 local
442 interface IMFVideoMediaType : IMFMediaType
444 const MFVIDEOFORMAT *GetVideoFormat();
446 HRESULT GetVideoRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation,
447 [in] LONG lStride);
451 object,
452 uuid(ac6b7889-0740-4d51-8619-905994a55cc6)
454 interface IMFAsyncResult : IUnknown
456 HRESULT GetState([out] IUnknown **ppunkState);
457 HRESULT GetStatus();
458 HRESULT SetStatus([in] HRESULT hrStatus);
459 HRESULT GetObject([out] IUnknown **ppObject);
460 [local] IUnknown *GetStateNoAddRef();
464 object,
465 uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
467 interface IMFAsyncCallback : IUnknown
469 HRESULT GetParameters([out] DWORD *pdwFlags, [out] DWORD *pdwQueue);
470 HRESULT Invoke([in] IMFAsyncResult *pAsyncResult);
474 object,
475 uuid(a27003d0-2354-4f2a-8d6a-ab7cff15437e),
477 interface IMFRemoteAsyncCallback : IUnknown
479 HRESULT Invoke([in] HRESULT hr, [in] IUnknown *pRemoteResult);
482 cpp_quote("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x00000001")
483 cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x00000002")
484 cpp_quote("#define MFASYNC_BLOCKING_CALLBACK 0x00000004")
485 cpp_quote("#define MFASYNC_REPLY_CALLBACK 0x00000008")
486 cpp_quote("#define MFASYNC_LOCALIZE_REMOTE_CALLBACK 0x00000010")
488 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
489 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
490 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
491 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
492 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
493 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_MULTITHREADED 0x00000005")
494 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
495 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
496 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
498 enum {
499 MEUnknown = 0,
500 MEError = 1,
501 MEExtendedType = 2,
502 MENonFatalError = 3,
503 MEGenericV1Anchor = MENonFatalError,
504 MESessionUnknown = 100,
505 MESessionTopologySet = 101,
506 MESessionTopologiesCleared = 102,
507 MESessionStarted = 103,
508 MESessionPaused = 104,
509 MESessionStopped = 105,
510 MESessionClosed = 106,
511 MESessionEnded = 107,
512 MESessionRateChanged = 108,
513 MESessionScrubSampleComplete = 109,
514 MESessionCapabilitiesChanged = 110,
515 MESessionTopologyStatus = 111,
516 MESessionNotifyPresentationTime = 112,
517 MENewPresentation = 113,
518 MELicenseAcquisitionStart = 114,
519 MELicenseAcquisitionCompleted = 115,
520 MEIndividualizationStart = 116,
521 MEIndividualizationCompleted = 117,
522 MEEnablerProgress = 118,
523 MEEnablerCompleted = 119,
524 MEPolicyError = 120,
525 MEPolicyReport = 121,
526 MEBufferingStarted = 122,
527 MEBufferingStopped = 123,
528 MEConnectStart = 124,
529 MEConnectEnd = 125,
530 MEReconnectStart = 126,
531 MEReconnectEnd = 127,
532 MERendererEvent = 128,
533 MESessionStreamSinkFormatChanged = 129,
534 MESessionV1Anchor = MESessionStreamSinkFormatChanged,
535 MESourceUnknown = 200,
536 MESourceStarted = 201,
537 MEStreamStarted = 202,
538 MESourceSeeked = 203,
539 MEStreamSeeked = 204,
540 MENewStream = 205,
541 MEUpdatedStream = 206,
542 MESourceStopped = 207,
543 MEStreamStopped = 208,
544 MESourcePaused = 209,
545 MEStreamPaused = 210,
546 MEEndOfPresentation = 211,
547 MEEndOfStream = 212,
548 MEMediaSample = 213,
549 MEStreamTick = 214,
550 MEStreamThinMode = 215,
551 MEStreamFormatChanged = 216,
552 MESourceRateChanged = 217,
553 MEEndOfPresentationSegment = 218,
554 MESourceCharacteristicsChanged = 219,
555 MESourceRateChangeRequested = 220,
556 MESourceMetadataChanged = 221,
557 MESequencerSourceTopologyUpdated = 222,
558 MESourceV1Anchor = MESequencerSourceTopologyUpdated,
559 MESinkUnknown = 300,
560 MEStreamSinkStarted = 301,
561 MEStreamSinkStopped = 302,
562 MEStreamSinkPaused = 303,
563 MEStreamSinkRateChanged = 304,
564 MEStreamSinkRequestSample = 305,
565 MEStreamSinkMarker = 306,
566 MEStreamSinkPrerolled = 307,
567 MEStreamSinkScrubSampleComplete = 308,
568 MEStreamSinkFormatChanged = 309,
569 MEStreamSinkDeviceChanged = 310,
570 MEQualityNotify = 311,
571 MESinkInvalidated = 312,
572 MEAudioSessionNameChanged = 313,
573 MEAudioSessionVolumeChanged = 314,
574 MEAudioSessionDeviceRemoved = 315,
575 MEAudioSessionServerShutdown = 316,
576 MEAudioSessionGroupingParamChanged = 317,
577 MEAudioSessionIconChanged = 318,
578 MEAudioSessionFormatChanged = 319,
579 MEAudioSessionDisconnected = 320,
580 MEAudioSessionExclusiveModeOverride = 321,
581 MESinkV1Anchor = MEAudioSessionExclusiveModeOverride,
582 METrustUnknown = 400,
583 MEPolicyChanged = 401,
584 MEContentProtectionMessage = 402,
585 MEPolicySet = 403,
586 METrustV1Anchor = MEPolicySet,
587 MEWMDRMLicenseBackupCompleted = 500,
588 MEWMDRMLicenseBackupProgress = 501,
589 MEWMDRMLicenseRestoreCompleted = 502,
590 MEWMDRMLicenseRestoreProgress = 503,
591 MEWMDRMLicenseAcquisitionCompleted = 506,
592 MEWMDRMIndividualizationCompleted = 508,
593 MEWMDRMIndividualizationProgress = 513,
594 MEWMDRMProximityCompleted = 514,
595 MEWMDRMLicenseStoreCleaned = 515,
596 MEWMDRMRevocationDownloadCompleted = 516,
597 MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted,
598 METransformUnknown = 600,
599 METransformNeedInput = 601,
600 METransformHaveOutput = 602,
601 METransformDrainComplete = 603,
602 METransformMarker = 604,
603 METransformInputStreamStateChanged = 605,
604 MEByteStreamCharacteristicsChanged = 700,
605 MEVideoCaptureDeviceRemoved = 800,
606 MEVideoCaptureDevicePreempted = 801,
607 MEStreamSinkFormatInvalidated = 802,
608 MEEncodingParameters = 803,
609 MEContentProtectionMetadata = 900,
610 MEDeviceThermalStateChanged = 950,
611 MEReservedMax = 10000
614 typedef DWORD MediaEventType;
617 object,
618 uuid(df598932-f10c-4e39-bba2-c308f101daa3)
620 interface IMFMediaEvent : IMFAttributes
622 HRESULT GetType([out] MediaEventType *pmet);
623 HRESULT GetExtendedType([out] GUID *pguidExtendedType);
624 HRESULT GetStatus([out] HRESULT *phrStatus);
625 HRESULT GetValue([out] PROPVARIANT *pvValue);
628 cpp_quote("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
631 object,
632 uuid(2cd0bd52-bcd5-4b89-b62c-eadc0c031e7d)
634 interface IMFMediaEventGenerator : IUnknown
636 HRESULT GetEvent([in] DWORD dwFlags, [out] IMFMediaEvent **ppEvent);
638 [local] HRESULT BeginGetEvent([in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
639 [call_as(BeginGetEvent)] HRESULT RemoteBeginGetEvent([in] IMFRemoteAsyncCallback *pCallback);
641 [local] HRESULT EndGetEvent([in] IMFAsyncResult *pResult, [out] IMFMediaEvent **ppEvent);
642 [call_as(EndGetEvent)] HRESULT RemoteEndGetEvent([in] IUnknown *pResult, [out] DWORD *pcbEvent,
643 [out, size_is(,*pcbEvent)] BYTE **ppbEvent);
645 HRESULT QueueEvent([in] MediaEventType met, [in] REFGUID guidExtendedType, [in] HRESULT hrStatus,
646 [in, unique] const PROPVARIANT *pvValue);
649 typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
650 msoBegin,
651 msoCurrent
652 } MFBYTESTREAM_SEEK_ORIGIN;
655 object,
656 uuid(ad4c1b00-4bf7-422f-9175-756693d9130d),
658 interface IMFByteStream : IUnknown
660 HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
661 HRESULT GetLength([out] QWORD *pqwLength);
662 HRESULT SetLength([in] QWORD qwLength);
663 HRESULT GetCurrentPosition([out] QWORD *pqwPosition);
664 HRESULT SetCurrentPosition([in] QWORD qwPosition);
665 HRESULT IsEndOfStream([out] BOOL *pfEndOfStream);
667 [local] HRESULT Read([in] BYTE* pb, [in] ULONG cb, [out] ULONG *pcbRead);
668 [local] HRESULT BeginRead([in] BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
669 [local] HRESULT EndRead([in] IMFAsyncResult *pResult, [out] ULONG *pcbRead);
670 [local] HRESULT Write([in] const BYTE *pb, [in] ULONG cb, [out] ULONG *pcbWritten);
671 [local] HRESULT BeginWrite([in] const BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
672 [local] HRESULT EndWrite([in] IMFAsyncResult *pResult, [out] ULONG *pcbWritten);
673 [local] HRESULT Seek([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, [in] LONGLONG llSeekOffset, [in] DWORD dwSeekFlags,
674 [out] QWORD *pqwCurrentPosition);
676 HRESULT Flush();
677 HRESULT Close();
680 cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
681 cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
682 cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
683 cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
684 cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
685 cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
686 cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
687 cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
688 cpp_quote("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
690 cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
692 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
693 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
694 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
695 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
696 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
697 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
699 typedef enum MF_FILE_ACCESSMODE {
700 MF_ACCESSMODE_READ = 1,
701 MF_ACCESSMODE_WRITE = 2,
702 MF_ACCESSMODE_READWRITE = 3
703 } MF_FILE_ACCESSMODE;
705 typedef enum {
706 MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
707 MF_OPENMODE_FAIL_IF_EXIST = 1,
708 MF_OPENMODE_RESET_IF_EXIST = 2,
709 MF_OPENMODE_APPEND_IF_EXIST = 3,
710 MF_OPENMODE_DELETE_IF_EXIST = 4
711 } MF_FILE_OPENMODE;
713 typedef enum {
714 MF_FILEFLAGS_NONE = 0x00000000,
715 MF_FILEFLAGS_NOBUFFERING = 0x00000001,
716 MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
717 } MF_FILE_FLAGS;
720 object,
721 uuid(8feed468-6f7e-440d-869a-49bdd283ad0d),
723 interface IMFSampleOutputStream : IUnknown
725 HRESULT BeginWriteSample(
726 [in] IMFSample *sample,
727 [in] IMFAsyncCallback *callback,
728 [in] IUnknown *state);
730 HRESULT EndWriteSample(
731 [in] IMFAsyncResult *result);
733 HRESULT Close();
737 object,
738 uuid(5bc8a76b-869a-46a3-9b03-fa218a66aebe)
740 interface IMFCollection : IUnknown
742 HRESULT GetElementCount([out] DWORD *pcElements);
743 HRESULT GetElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
744 HRESULT AddElement([in] IUnknown *pUnkElement);
745 HRESULT RemoveElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
746 HRESULT InsertElementAt([in] DWORD dwIndex, [in] IUnknown *pUnknown);
747 HRESULT RemoveAllElements();
751 object,
752 uuid(7fee9e9a-4a89-47a6-899c-b6a53a70fb67),
753 pointer_default(unique)
755 interface IMFActivate : IMFAttributes
757 HRESULT ActivateObject([in] REFIID riid, [out, iid_is(riid), retval] void **ppv);
758 HRESULT ShutdownObject();
759 HRESULT DetachObject();
762 typedef enum _MF_Plugin_Type {
763 MF_Plugin_Type_MFT = 0,
764 MF_Plugin_Type_MediaSource = 1
765 } MF_Plugin_Type;
768 object,
769 local,
770 uuid(5c6c44bf-1db6-435b-9249-e8cd10fdec96),
771 pointer_default(unique)
773 interface IMFPluginControl : IUnknown
775 HRESULT GetPreferredClsid(DWORD pluginType, LPCWSTR selector, CLSID *clsid);
776 HRESULT GetPreferredClsidByIndex(DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
777 HRESULT SetPreferredClsid(DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
778 HRESULT IsDisabled(DWORD pluginType, REFCLSID clsid);
779 HRESULT GetDisabledByIndex(DWORD pluginType, DWORD index, CLSID *clsid);
780 HRESULT SetDisabled(DWORD pluginType, REFCLSID clsid, BOOL disabled);
784 object,
785 uuid(36f846fc-2256-48b6-b58e-e2b638316581),
786 local
788 interface IMFMediaEventQueue : IUnknown
790 HRESULT GetEvent([in] DWORD flags, [out] IMFMediaEvent **event);
791 HRESULT BeginGetEvent([in] IMFAsyncCallback *callback, [in] IUnknown *state);
792 HRESULT EndGetEvent([in] IMFAsyncResult *result, [out] IMFMediaEvent **event);
793 HRESULT QueueEvent([in] IMFMediaEvent *event);
794 HRESULT QueueEventParamVar([in] MediaEventType met, [in] REFGUID type,
795 [in] HRESULT status, [in, unique] const PROPVARIANT *value);
796 HRESULT QueueEventParamUnk([in] MediaEventType met, [in] REFGUID type,
797 [in] HRESULT status, [in, unique] IUnknown *unk);
798 HRESULT Shutdown();
802 object,
803 uuid(eb533d5d-2db6-40f8-97a9-494692014f07),
804 local,
805 pointer_default(unique)
807 interface IMFDXGIDeviceManager : IUnknown
809 HRESULT CloseDeviceHandle([in] HANDLE device);
810 HRESULT GetVideoService([in] HANDLE device, [in] REFIID riid, [out] void **service);
811 HRESULT LockDevice([in] HANDLE device, [in] REFIID riid, [out] void **ppv, [in] BOOL block);
812 HRESULT OpenDeviceHandle([out] HANDLE *device);
813 HRESULT ResetDevice([in] IUnknown *device, [in] UINT token);
814 HRESULT TestDevice([in] HANDLE device);
815 HRESULT UnlockDevice([in] HANDLE device, [in] BOOL state);