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
21 import
"mediaobj.idl";
23 cpp_quote
("#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
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
;
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
);
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
93 uuid(045fa593
-8799-42b8
-bc8d
-8968c6453507
),
96 interface IMFMediaBuffer
: IUnknown
98 HRESULT Lock
([out] BYTE **ppbBuffer
, [out] DWORD
*pcbMaxLength
, [out] DWORD
*pcbCurrentLength
);
100 HRESULT GetCurrentLength
([out] DWORD
*pcbCurrentLength
);
101 HRESULT SetCurrentLength
([in] DWORD cbCurrentLength
);
102 HRESULT GetMaxLength
([out] DWORD
*pcbMaxLength
);
107 uuid(c40a00f2
-b93a
-4d80
-ae8c
-5a1c634f58e4
),
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
);
130 uuid(7dc9d5f9
-9ed9
-44ec
-9bbf
-0600bb589fbb
),
133 interface IMF2DBuffer
: IUnknown
135 HRESULT Lock2D
([out] BYTE **pbScanline0
, [out] LONG *plPitch
);
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
;
155 uuid(33ae5ea6
-4316-436f
-8ddd
-d73d22f829ec
),
158 interface IMF2DBuffer2
: IMF2DBuffer
161 [in] MF2DBuffer_LockFlags flags
,
162 [out] BYTE **scanline0
,
164 [out] BYTE **buffer_start
,
165 [out] DWORD
*buffer_length
);
167 HRESULT Copy2DTo
([in] IMF2DBuffer2
*dest_buffer
);
172 uuid(e7174cfa
-1c9e
-48b1
-8866-626226bfc258
),
175 interface IMFDXGIBuffer
: IUnknown
182 HRESULT GetSubresourceIndex
(
200 uuid(44ae0fa8
-ea31
-4109-8d2e
-4cae4997c555
),
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")
219 uuid(26a0adc3
-ce26
-4672-9304-69552edd3faf
),
222 interface IMFAudioMediaType
: IMFMediaType
224 const WAVEFORMATEX
*GetAudioFormat
();
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
255 typedef struct _MFRatio
{
260 typedef struct _MFOffset
{
265 typedef struct _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
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
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
367 typedef struct _MFVideoInfo
{
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
;
385 typedef struct _MFVideoCompressedInfo
{
387 LONGLONG AvgBitErrorRate
;
388 DWORD MaxKeyFrameSpacing
;
389 } MFVideoCompressedInfo
;
391 typedef struct _MFARGB
{
398 typedef struct __MFAYUVSample
{
405 typedef union _MFPaletteEntry
{
410 typedef struct _MFVideoSurfaceInfo
{
412 DWORD PaletteEntries
;
413 MFPaletteEntry Palette
[];
414 } MFVideoSurfaceInfo
;
416 typedef struct _MFVIDEOFORMAT
{
418 MFVideoInfo videoInfo
;
420 MFVideoCompressedInfo compressedInfo
;
421 MFVideoSurfaceInfo surfaceInfo
;
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
;
439 uuid(b99f381f
-a8f9
-47a2
-a5af
-ca3a225a3890
),
442 interface IMFVideoMediaType
: IMFMediaType
444 const MFVIDEOFORMAT
*GetVideoFormat
();
446 HRESULT GetVideoRepresentation
([in] GUID guidRepresentation
, [out] LPVOID
*ppvRepresentation
,
452 uuid(ac6b7889
-0740-4d51
-8619-905994a55cc6
)
454 interface IMFAsyncResult
: IUnknown
456 HRESULT GetState
([out] IUnknown
**ppunkState
);
458 HRESULT SetStatus
([in] HRESULT hrStatus
);
459 HRESULT GetObject
([out] IUnknown
**ppObject
);
460 [local] IUnknown
*GetStateNoAddRef
();
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
);
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")
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,
525 MEPolicyReport
= 121,
526 MEBufferingStarted
= 122,
527 MEBufferingStopped
= 123,
528 MEConnectStart
= 124,
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,
541 MEUpdatedStream
= 206,
542 MESourceStopped
= 207,
543 MEStreamStopped
= 208,
544 MESourcePaused
= 209,
545 MEStreamPaused
= 210,
546 MEEndOfPresentation
= 211,
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
,
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 MECaptureAudioSessionVolumeChanged
= 322,
583 MECaptureAudioSessionDeviceRemoved
= 323,
584 MECaptureAudioSessionFormatChanged
= 324,
585 MECaptureAudioSessionDisconnected
= 325,
586 MECaptureAudioSessionExclusiveModeOverride
= 326,
587 MECaptureAudioSessionServerShutdown
= 327,
588 MESinkV2Anchor
= MECaptureAudioSessionServerShutdown
,
589 METrustUnknown
= 400,
590 MEPolicyChanged
= 401,
591 MEContentProtectionMessage
= 402,
593 METrustV1Anchor
= MEPolicySet
,
594 MEWMDRMLicenseBackupCompleted
= 500,
595 MEWMDRMLicenseBackupProgress
= 501,
596 MEWMDRMLicenseRestoreCompleted
= 502,
597 MEWMDRMLicenseRestoreProgress
= 503,
598 MEWMDRMLicenseAcquisitionCompleted
= 506,
599 MEWMDRMIndividualizationCompleted
= 508,
600 MEWMDRMIndividualizationProgress
= 513,
601 MEWMDRMProximityCompleted
= 514,
602 MEWMDRMLicenseStoreCleaned
= 515,
603 MEWMDRMRevocationDownloadCompleted
= 516,
604 MEWMDRMV1Anchor
= MEWMDRMRevocationDownloadCompleted
,
605 METransformUnknown
= 600,
606 METransformNeedInput
= 601,
607 METransformHaveOutput
= 602,
608 METransformDrainComplete
= 603,
609 METransformMarker
= 604,
610 METransformInputStreamStateChanged
= 605,
611 MEByteStreamCharacteristicsChanged
= 700,
612 MEVideoCaptureDeviceRemoved
= 800,
613 MEVideoCaptureDevicePreempted
= 801,
614 MEStreamSinkFormatInvalidated
= 802,
615 MEEncodingParameters
= 803,
616 MEContentProtectionMetadata
= 900,
617 MEDeviceThermalStateChanged
= 950,
618 MEReservedMax
= 10000
621 typedef DWORD MediaEventType
;
625 uuid(df598932
-f10c
-4e39
-bba2
-c308f101daa3
)
627 interface IMFMediaEvent
: IMFAttributes
629 HRESULT GetType
([out] MediaEventType
*pmet
);
630 HRESULT GetExtendedType
([out] GUID
*pguidExtendedType
);
631 HRESULT GetStatus
([out] HRESULT *phrStatus
);
632 HRESULT GetValue
([out] PROPVARIANT
*pvValue
);
635 cpp_quote
("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
639 uuid(2cd0bd52
-bcd5
-4b89
-b62c
-eadc0c031e7d
)
641 interface IMFMediaEventGenerator
: IUnknown
643 HRESULT GetEvent
([in] DWORD dwFlags
, [out] IMFMediaEvent
**ppEvent
);
645 [local] HRESULT BeginGetEvent
([in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
646 [call_as
(BeginGetEvent
)] HRESULT RemoteBeginGetEvent
([in] IMFRemoteAsyncCallback
*pCallback
);
648 [local] HRESULT EndGetEvent
([in] IMFAsyncResult
*pResult
, [out] IMFMediaEvent
**ppEvent
);
649 [call_as
(EndGetEvent
)] HRESULT RemoteEndGetEvent
([in] IUnknown
*pResult
, [out] DWORD
*pcbEvent
,
650 [out, size_is(,*pcbEvent
)] BYTE **ppbEvent
);
652 HRESULT QueueEvent
([in] MediaEventType met
, [in] REFGUID guidExtendedType
, [in] HRESULT hrStatus
,
653 [in, unique] const PROPVARIANT
*pvValue
);
656 typedef enum _MFBYTESTREAM_SEEK_ORIGIN
{
659 } MFBYTESTREAM_SEEK_ORIGIN
;
663 uuid(ad4c1b00
-4bf7
-422f
-9175-756693d9130d
),
665 interface IMFByteStream
: IUnknown
667 HRESULT GetCapabilities
([out] DWORD
*pdwCapabilities
);
668 HRESULT GetLength
([out] QWORD
*pqwLength
);
669 HRESULT SetLength
([in] QWORD qwLength
);
670 HRESULT GetCurrentPosition
([out] QWORD
*pqwPosition
);
671 HRESULT SetCurrentPosition
([in] QWORD qwPosition
);
672 HRESULT IsEndOfStream
([out] BOOL
*pfEndOfStream
);
674 [local] HRESULT Read
([in] BYTE* pb
, [in] ULONG cb
, [out] ULONG
*pcbRead
);
675 [local] HRESULT BeginRead
([in] BYTE *pb
, [in] ULONG cb
, [in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
676 [local] HRESULT EndRead
([in] IMFAsyncResult
*pResult
, [out] ULONG
*pcbRead
);
677 [local] HRESULT Write
([in] const BYTE *pb
, [in] ULONG cb
, [out] ULONG
*pcbWritten
);
678 [local] HRESULT BeginWrite
([in] const BYTE *pb
, [in] ULONG cb
, [in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
679 [local] HRESULT EndWrite
([in] IMFAsyncResult
*pResult
, [out] ULONG
*pcbWritten
);
680 [local] HRESULT Seek
([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin
, [in] LONGLONG llSeekOffset
, [in] DWORD dwSeekFlags
,
681 [out] QWORD
*pqwCurrentPosition
);
687 cpp_quote
("#define MFBYTESTREAM_IS_READABLE 0x00000001")
688 cpp_quote
("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
689 cpp_quote
("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
690 cpp_quote
("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
691 cpp_quote
("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
692 cpp_quote
("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
693 cpp_quote
("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
694 cpp_quote
("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
695 cpp_quote
("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
697 cpp_quote
("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
699 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
700 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
701 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
702 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
703 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
704 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
705 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_EFFECTIVE_URL, 0x9afa0209,0x89d1,0x42af,0x84,0x56,0x1d,0xe6,0xb5,0x62,0xd6,0x91);")
707 typedef enum MF_FILE_ACCESSMODE
{
708 MF_ACCESSMODE_READ
= 1,
709 MF_ACCESSMODE_WRITE
= 2,
710 MF_ACCESSMODE_READWRITE
= 3
711 } MF_FILE_ACCESSMODE
;
714 MF_OPENMODE_FAIL_IF_NOT_EXIST
= 0,
715 MF_OPENMODE_FAIL_IF_EXIST
= 1,
716 MF_OPENMODE_RESET_IF_EXIST
= 2,
717 MF_OPENMODE_APPEND_IF_EXIST
= 3,
718 MF_OPENMODE_DELETE_IF_EXIST
= 4
722 MF_FILEFLAGS_NONE
= 0x00000000,
723 MF_FILEFLAGS_NOBUFFERING
= 0x00000001,
724 MF_FILEFLAGS_ALLOW_WRITE_SHARING
= 0x00000002
729 uuid(8feed468
-6f7e
-440d
-869a
-49bdd283ad0d
),
731 interface IMFSampleOutputStream
: IUnknown
733 HRESULT BeginWriteSample
(
734 [in] IMFSample
*sample
,
735 [in] IMFAsyncCallback
*callback,
736 [in] IUnknown
*state
);
738 HRESULT EndWriteSample
(
739 [in] IMFAsyncResult
*result
);
746 uuid(5bc8a76b
-869a
-46a3
-9b03
-fa218a66aebe
)
748 interface IMFCollection
: IUnknown
750 HRESULT GetElementCount
([out] DWORD
*pcElements
);
751 HRESULT GetElement
([in] DWORD dwElementIndex
, [out] IUnknown
**ppUnkElement
);
752 HRESULT AddElement
([in] IUnknown
*pUnkElement
);
753 HRESULT RemoveElement
([in] DWORD dwElementIndex
, [out] IUnknown
**ppUnkElement
);
754 HRESULT InsertElementAt
([in] DWORD dwIndex
, [in] IUnknown
*pUnknown
);
755 HRESULT RemoveAllElements
();
760 uuid(7fee9e9a
-4a89
-47a6
-899c
-b6a53a70fb67
),
761 pointer_default(unique)
763 interface IMFActivate
: IMFAttributes
765 HRESULT ActivateObject
([in] REFIID riid
, [out, iid_is(riid
), retval] void **ppv
);
766 HRESULT ShutdownObject
();
767 HRESULT DetachObject
();
770 typedef enum _MF_Plugin_Type
{
771 MF_Plugin_Type_MFT
= 0,
772 MF_Plugin_Type_MediaSource
= 1
778 uuid(5c6c44bf
-1db6
-435b
-9249-e8cd10fdec96
),
779 pointer_default(unique)
781 interface IMFPluginControl
: IUnknown
783 HRESULT GetPreferredClsid
(DWORD pluginType
, LPCWSTR selector
, CLSID
*clsid
);
784 HRESULT GetPreferredClsidByIndex
(DWORD pluginType
, DWORD index
, LPWSTR
*selector
, CLSID
*clsid
);
785 HRESULT SetPreferredClsid
(DWORD pluginType
, LPCWSTR selector
, const CLSID
*clsid
);
786 HRESULT IsDisabled
(DWORD pluginType
, REFCLSID clsid
);
787 HRESULT GetDisabledByIndex
(DWORD pluginType
, DWORD index
, CLSID
*clsid
);
788 HRESULT SetDisabled
(DWORD pluginType
, REFCLSID clsid
, BOOL disabled
);
793 uuid(36f846fc
-2256-48b6
-b58e
-e2b638316581
),
796 interface IMFMediaEventQueue
: IUnknown
798 HRESULT GetEvent
([in] DWORD flags
, [out] IMFMediaEvent
**event
);
799 HRESULT BeginGetEvent
([in] IMFAsyncCallback
*callback, [in] IUnknown
*state
);
800 HRESULT EndGetEvent
([in] IMFAsyncResult
*result
, [out] IMFMediaEvent
**event
);
801 HRESULT QueueEvent
([in] IMFMediaEvent
*event
);
802 HRESULT QueueEventParamVar
([in] MediaEventType met
, [in] REFGUID type
,
803 [in] HRESULT status
, [in, unique] const PROPVARIANT
*value
);
804 HRESULT QueueEventParamUnk
([in] MediaEventType met
, [in] REFGUID type
,
805 [in] HRESULT status
, [in, unique] IUnknown
*unk
);
811 uuid(eb533d5d
-2db6
-40f8
-97a9
-494692014f07
),
813 pointer_default(unique)
815 interface IMFDXGIDeviceManager
: IUnknown
817 HRESULT CloseDeviceHandle
([in] HANDLE device
);
818 HRESULT GetVideoService
([in] HANDLE device
, [in] REFIID riid
, [out] void **service
);
819 HRESULT LockDevice
([in] HANDLE device
, [in] REFIID riid
, [out] void **ppv
, [in] BOOL block
);
820 HRESULT OpenDeviceHandle
([out] HANDLE *device
);
821 HRESULT ResetDevice
([in] IUnknown
*device
, [in] UINT token
);
822 HRESULT TestDevice
([in] HANDLE device
);
823 HRESULT UnlockDevice
([in] HANDLE device
, [in] BOOL state
);