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
);
146 uuid(44ae0fa8
-ea31
-4109-8d2e
-4cae4997c555
),
149 interface IMFMediaType
: IMFAttributes
151 HRESULT GetMajorType
([out] GUID
*pguidMajorType
);
152 HRESULT IsCompressedFormat
([out] BOOL
*pfCompressed
);
153 HRESULT IsEqual
([in] IMFMediaType
*pIMediaType
, [out] DWORD
*pdwFlags
);
154 HRESULT GetRepresentation
([in] GUID guidRepresentation
, [out] LPVOID
*ppvRepresentation
);
155 HRESULT FreeRepresentation
([in] GUID guidRepresentation
, [in] LPVOID pvRepresentation
);
158 cpp_quote
("#define MF_MEDIATYPE_EQUAL_MAJOR_TYPES 0x00000001")
159 cpp_quote
("#define MF_MEDIATYPE_EQUAL_FORMAT_TYPES 0x00000002")
160 cpp_quote
("#define MF_MEDIATYPE_EQUAL_FORMAT_DATA 0x00000004")
161 cpp_quote
("#define MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA 0x00000008")
165 uuid(26a0adc3
-ce26
-4672-9304-69552edd3faf
),
168 interface IMFAudioMediaType
: IMFMediaType
170 const WAVEFORMATEX
*GetAudioFormat
();
176 } MFT_REGISTER_TYPE_INFO
;
178 typedef enum _MFVideoFlags
{
179 MFVideoFlag_PAD_TO_Mask
= 0x00000003,
180 MFVideoFlag_PAD_TO_None
= 0,
181 MFVideoFlag_PAD_TO_4x3
= 0x00000001,
182 MFVideoFlag_PAD_TO_16x9
= 0x00000002,
183 MFVideoFlag_SrcContentHintMask
= 0x0000001c,
184 MFVideoFlag_SrcContentHintNone
= 0,
185 MFVideoFlag_SrcContentHint16x9
= 0x00000004,
186 MFVideoFlag_SrcContentHint235_1
= 0x00000008,
187 MFVideoFlag_AnalogProtected
= 0x00000020,
188 MFVideoFlag_DigitallyProtected
= 0x00000040,
189 MFVideoFlag_ProgressiveContent
= 0x00000080,
190 MFVideoFlag_FieldRepeatCountMask
= 0x00000700,
191 MFVideoFlag_FieldRepeatCountShift
= 8,
192 MFVideoFlag_ProgressiveSeqReset
= 0x00000800,
193 MFVideoFlag_PanScanEnabled
= 0x00020000,
194 MFVideoFlag_LowerFieldFirst
= 0x00040000,
195 MFVideoFlag_BottomUpLinearRep
= 0x00080000,
196 MFVideoFlags_DXVASurface
= 0x00100000,
197 MFVideoFlags_RenderTargetSurface
= 0x00400000,
198 MFVideoFlags_ForceQWORD
= 0x7fffffff
201 typedef struct _MFRatio
{
206 typedef struct _MFOffset
{
211 typedef struct _MFVideoArea
{
217 typedef enum _MFVideoChromaSubsampling
{
218 MFVideoChromaSubsampling_Unknown
= 0,
219 MFVideoChromaSubsampling_ProgressiveChroma
= 0x8,
220 MFVideoChromaSubsampling_Horizontally_Cosited
= 0x4,
221 MFVideoChromaSubsampling_Vertically_Cosited
= 0x2,
222 MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
= 0x1,
223 MFVideoChromaSubsampling_MPEG2
224 = MFVideoChromaSubsampling_Horizontally_Cosited
225 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
,
226 MFVideoChromaSubsampling_MPEG1
227 = MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
,
228 MFVideoChromaSubsampling_DV_PAL
229 = MFVideoChromaSubsampling_Horizontally_Cosited
230 | MFVideoChromaSubsampling_Vertically_Cosited
,
231 MFVideoChromaSubsampling_Cosited
232 = MFVideoChromaSubsampling_Horizontally_Cosited
233 | MFVideoChromaSubsampling_Vertically_Cosited
234 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes
,
235 MFVideoChromaSubsampling_Last
= MFVideoChromaSubsampling_Cosited
+ 1,
236 MFVideoChromaSubsampling_ForceDWORD
= 0x7fffffff
237 } MFVideoChromaSubsampling
;
239 typedef enum _MFVideoInterlaceMode
{
240 MFVideoInterlace_Unknown
= 0,
241 MFVideoInterlace_Progressive
= 2,
242 MFVideoInterlace_FieldInterleavedUpperFirst
= 3,
243 MFVideoInterlace_FieldInterleavedLowerFirst
= 4,
244 MFVideoInterlace_FieldSingleUpper
= 5,
245 MFVideoInterlace_FieldSingleLower
= 6,
246 MFVideoInterlace_MixedInterlaceOrProgressive
= 7,
247 MFVideoInterlace_Last
,
248 MFVideoInterlace_ForceDWORD
= 0x7fffffff
249 } MFVideoInterlaceMode
;
251 typedef enum _MFVideoTransferFunction
{
252 MFVideoTransFunc_Unknown
= 0,
253 MFVideoTransFunc_10
= 1,
254 MFVideoTransFunc_18
= 2,
255 MFVideoTransFunc_20
= 3,
256 MFVideoTransFunc_22
= 4,
257 MFVideoTransFunc_709
= 5,
258 MFVideoTransFunc_240M
= 6,
259 MFVideoTransFunc_sRGB
= 7,
260 MFVideoTransFunc_28
= 8,
261 MFVideoTransFunc_Log_100
= 9,
262 MFVideoTransFunc_Log_316
= 10,
263 MFVideoTransFunc_709_sym
= 11,
264 MFVideoTransFunc_Last
,
265 MFVideoTransFunc_ForceDWORD
= 0x7fffffff
266 } MFVideoTransferFunction
;
268 typedef enum _MFVideoTransferMatrix
{
269 MFVideoTransferMatrix_Unknown
= 0,
270 MFVideoTransferMatrix_BT709
= 1,
271 MFVideoTransferMatrix_BT601
= 2,
272 MFVideoTransferMatrix_SMPTE240M
= 3,
273 MFVideoTransferMatrix_BT2020_10
= 4,
274 MFVideoTransferMatrix_BT2020_12
= 5,
275 MFVideoTransferMatrix_Last
,
276 MFVideoTransferMatrix_ForceDWORD
= 0x7fffffff
277 } MFVideoTransferMatrix
;
279 typedef enum _MFVideoPrimaries
{
280 MFVideoPrimaries_Unknown
= 0,
281 MFVideoPrimaries_reserved
= 1,
282 MFVideoPrimaries_BT709
= 2,
283 MFVideoPrimaries_BT470_2_SysM
= 3,
284 MFVideoPrimaries_BT470_2_SysBG
= 4,
285 MFVideoPrimaries_SMPTE170M
= 5,
286 MFVideoPrimaries_SMPTE240M
= 6,
287 MFVideoPrimaries_EBU3213
= 7,
288 MFVideoPrimaries_SMPTE_C
= 8,
289 MFVideoPrimaries_Last
,
290 MFVideoPrimaries_ForceDWORD
= 0x7fffffff
293 typedef enum _MFVideoLighting
{
294 MFVideoLighting_Unknown
= 0,
295 MFVideoLighting_bright
= 1,
296 MFVideoLighting_office
= 2,
297 MFVideoLighting_dim
= 3,
298 MFVideoLighting_dark
= 4,
299 MFVideoLighting_Last
,
300 MFVideoLighting_ForceDWORD
= 0x7fffffff
303 typedef enum _MFNominalRange
{
304 MFNominalRange_Unknown
= 0,
305 MFNominalRange_Normal
= 1,
306 MFNominalRange_Wide
= 2,
307 MFNominalRange_0_255
= 1,
308 MFNominalRange_16_235
= 2,
309 MFNominalRange_48_208
= 3,
310 MFNominalRange_64_127
= 4
313 typedef struct _MFVideoInfo
{
316 MFRatio PixelAspectRatio
;
317 MFVideoChromaSubsampling SourceChromaSubsampling
;
318 MFVideoInterlaceMode InterlaceMode
;
319 MFVideoTransferFunction TransferFunction
;
320 MFVideoPrimaries ColorPrimaries
;
321 MFVideoTransferMatrix TransferMatrix
;
322 MFVideoLighting SourceLighting
;
323 MFRatio FramesPerSecond
;
324 MFNominalRange NominalRange
;
325 MFVideoArea GeometricAperture
;
326 MFVideoArea MinimumDisplayAperture
;
327 MFVideoArea PanScanAperture
;
328 unsigned __int64 VideoFlags
;
331 typedef struct _MFVideoCompressedInfo
{
333 LONGLONG AvgBitErrorRate
;
334 DWORD MaxKeyFrameSpacing
;
335 } MFVideoCompressedInfo
;
337 typedef struct _MFARGB
{
344 typedef struct __MFAYUVSample
{
351 typedef union _MFPaletteEntry
{
356 typedef struct _MFVideoSurfaceInfo
{
358 DWORD PaletteEntries
;
359 MFPaletteEntry Palette
[];
360 } MFVideoSurfaceInfo
;
362 typedef struct _MFVIDEOFORMAT
{
364 MFVideoInfo videoInfo
;
366 MFVideoCompressedInfo compressedInfo
;
367 MFVideoSurfaceInfo surfaceInfo
;
370 typedef enum _MFStandardVideoFormat
{
371 MFStdVideoFormat_reserved
= 0,
372 MFStdVideoFormat_NTSC
,
373 MFStdVideoFormat_PAL
,
374 MFStdVideoFormat_DVD_NTSC
,
375 MFStdVideoFormat_DVD_PAL
,
376 MFStdVideoFormat_DV_PAL
,
377 MFStdVideoFormat_DV_NTSC
,
378 MFStdVideoFormat_ATSC_SD480i
,
379 MFStdVideoFormat_ATSC_HD1080i
,
380 MFStdVideoFormat_ATSC_HD720p
381 } MFStandardVideoFormat
;
385 uuid(b99f381f
-a8f9
-47a2
-a5af
-ca3a225a3890
),
388 interface IMFVideoMediaType
: IMFMediaType
390 const MFVIDEOFORMAT
*GetVideoFormat
();
392 HRESULT GetVideoRepresentation
([in] GUID guidRepresentation
, [out] LPVOID
*ppvRepresentation
,
398 uuid(ac6b7889
-0740-4d51
-8619-905994a55cc6
)
400 interface IMFAsyncResult
: IUnknown
402 HRESULT GetState
([out] IUnknown
**ppunkState
);
404 HRESULT SetStatus
([in] HRESULT hrStatus
);
405 HRESULT GetObject
([out] IUnknown
**ppObject
);
406 [local] IUnknown
*GetStateNoAddRef
();
411 uuid(a27003cf
-2354-4f2a
-8d6a
-ab7cff15437e
),
413 interface IMFAsyncCallback
: IUnknown
415 HRESULT GetParameters
([out] DWORD
*pdwFlags
, [out] DWORD
*pdwQueue
);
416 HRESULT Invoke
([in] IMFAsyncResult
*pAsyncResult
);
421 uuid(a27003d0
-2354-4f2a
-8d6a
-ab7cff15437e
),
423 interface IMFRemoteAsyncCallback
: IUnknown
425 HRESULT Invoke
([in] HRESULT hr
, [in] IUnknown
*pRemoteResult
);
428 cpp_quote
("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x00000001")
429 cpp_quote
("#define MFASYNC_SIGNAL_CALLBACK 0x00000002")
430 cpp_quote
("#define MFASYNC_BLOCKING_CALLBACK 0x00000004")
431 cpp_quote
("#define MFASYNC_REPLY_CALLBACK 0x00000008")
432 cpp_quote
("#define MFASYNC_LOCALIZE_REMOTE_CALLBACK 0x00000010")
434 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
435 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
436 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
437 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
438 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
439 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_MULTITHREADED 0x00000005")
440 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
441 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
442 cpp_quote
("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
449 MEGenericV1Anchor
= MENonFatalError
,
450 MESessionUnknown
= 100,
451 MESessionTopologySet
= 101,
452 MESessionTopologiesCleared
= 102,
453 MESessionStarted
= 103,
454 MESessionPaused
= 104,
455 MESessionStopped
= 105,
456 MESessionClosed
= 106,
457 MESessionEnded
= 107,
458 MESessionRateChanged
= 108,
459 MESessionScrubSampleComplete
= 109,
460 MESessionCapabilitiesChanged
= 110,
461 MESessionTopologyStatus
= 111,
462 MESessionNotifyPresentationTime
= 112,
463 MENewPresentation
= 113,
464 MELicenseAcquisitionStart
= 114,
465 MELicenseAcquisitionCompleted
= 115,
466 MEIndividualizationStart
= 116,
467 MEIndividualizationCompleted
= 117,
468 MEEnablerProgress
= 118,
469 MEEnablerCompleted
= 119,
471 MEPolicyReport
= 121,
472 MEBufferingStarted
= 122,
473 MEBufferingStopped
= 123,
474 MEConnectStart
= 124,
476 MEReconnectStart
= 126,
477 MEReconnectEnd
= 127,
478 MERendererEvent
= 128,
479 MESessionStreamSinkFormatChanged
= 129,
480 MESessionV1Anchor
= MESessionStreamSinkFormatChanged
,
481 MESourceUnknown
= 200,
482 MESourceStarted
= 201,
483 MEStreamStarted
= 202,
484 MESourceSeeked
= 203,
485 MEStreamSeeked
= 204,
487 MEUpdatedStream
= 206,
488 MESourceStopped
= 207,
489 MEStreamStopped
= 208,
490 MESourcePaused
= 209,
491 MEStreamPaused
= 210,
492 MEEndOfPresentation
= 211,
496 MEStreamThinMode
= 215,
497 MEStreamFormatChanged
= 216,
498 MESourceRateChanged
= 217,
499 MEEndOfPresentationSegment
= 218,
500 MESourceCharacteristicsChanged
= 219,
501 MESourceRateChangeRequested
= 220,
502 MESourceMetadataChanged
= 221,
503 MESequencerSourceTopologyUpdated
= 222,
504 MESourceV1Anchor
= MESequencerSourceTopologyUpdated
,
506 MEStreamSinkStarted
= 301,
507 MEStreamSinkStopped
= 302,
508 MEStreamSinkPaused
= 303,
509 MEStreamSinkRateChanged
= 304,
510 MEStreamSinkRequestSample
= 305,
511 MEStreamSinkMarker
= 306,
512 MEStreamSinkPrerolled
= 307,
513 MEStreamSinkScrubSampleComplete
= 308,
514 MEStreamSinkFormatChanged
= 309,
515 MEStreamSinkDeviceChanged
= 310,
516 MEQualityNotify
= 311,
517 MESinkInvalidated
= 312,
518 MEAudioSessionNameChanged
= 313,
519 MEAudioSessionVolumeChanged
= 314,
520 MEAudioSessionDeviceRemoved
= 315,
521 MEAudioSessionServerShutdown
= 316,
522 MEAudioSessionGroupingParamChanged
= 317,
523 MEAudioSessionIconChanged
= 318,
524 MEAudioSessionFormatChanged
= 319,
525 MEAudioSessionDisconnected
= 320,
526 MEAudioSessionExclusiveModeOverride
= 321,
527 MESinkV1Anchor
= MEAudioSessionExclusiveModeOverride
,
528 METrustUnknown
= 400,
529 MEPolicyChanged
= 401,
530 MEContentProtectionMessage
= 402,
532 METrustV1Anchor
= MEPolicySet
,
533 MEWMDRMLicenseBackupCompleted
= 500,
534 MEWMDRMLicenseBackupProgress
= 501,
535 MEWMDRMLicenseRestoreCompleted
= 502,
536 MEWMDRMLicenseRestoreProgress
= 503,
537 MEWMDRMLicenseAcquisitionCompleted
= 506,
538 MEWMDRMIndividualizationCompleted
= 508,
539 MEWMDRMIndividualizationProgress
= 513,
540 MEWMDRMProximityCompleted
= 514,
541 MEWMDRMLicenseStoreCleaned
= 515,
542 MEWMDRMRevocationDownloadCompleted
= 516,
543 MEWMDRMV1Anchor
= MEWMDRMRevocationDownloadCompleted
,
544 MEReservedMax
= 10000
547 typedef DWORD MediaEventType
;
551 uuid(df598932
-f10c
-4e39
-bba2
-c308f101daa3
)
553 interface IMFMediaEvent
: IMFAttributes
555 HRESULT GetType
([out] MediaEventType
*pmet
);
556 HRESULT GetExtendedType
([out] GUID
*pguidExtendedType
);
557 HRESULT GetStatus
([out] HRESULT *phrStatus
);
558 HRESULT GetValue
([out] PROPVARIANT
*pvValue
);
561 cpp_quote
("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
565 uuid(2cd0bd52
-bcd5
-4b89
-b62c
-eadc0c031e7d
)
567 interface IMFMediaEventGenerator
: IUnknown
569 HRESULT GetEvent
([in] DWORD dwFlags
, [out] IMFMediaEvent
**ppEvent
);
571 [local] HRESULT BeginGetEvent
([in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
572 [call_as
(BeginGetEvent
)] HRESULT RemoteBeginGetEvent
([in] IMFRemoteAsyncCallback
*pCallback
);
574 [local] HRESULT EndGetEvent
([in] IMFAsyncResult
*pResult
, [out] IMFMediaEvent
**ppEvent
);
575 [call_as
(EndGetEvent
)] HRESULT RemoteEndGetEvent
([in] IUnknown
*pResult
, [out] DWORD
*pcbEvent
,
576 [out, size_is(,*pcbEvent
)] BYTE **ppbEvent
);
578 HRESULT QueueEvent
([in] MediaEventType met
, [in] REFGUID guidExtendedType
, [in] HRESULT hrStatus
,
579 [in, unique] const PROPVARIANT
*pvValue
);
582 typedef enum _MFBYTESTREAM_SEEK_ORIGIN
{
585 } MFBYTESTREAM_SEEK_ORIGIN
;
589 uuid(ad4c1b00
-4bf7
-422f
-9175-756693d9130d
),
591 interface IMFByteStream
: IUnknown
593 HRESULT GetCapabilities
([out] DWORD
*pdwCapabilities
);
594 HRESULT GetLength
([out] QWORD
*pqwLength
);
595 HRESULT SetLength
([in] QWORD qwLength
);
596 HRESULT GetCurrentPosition
([out] QWORD
*pqwPosition
);
597 HRESULT SetCurrentPosition
([in] QWORD qwPosition
);
598 HRESULT IsEndOfStream
([out] BOOL
*pfEndOfStream
);
600 [local] HRESULT Read
([in] BYTE* pb
, [in] ULONG cb
, [out] ULONG
*pcbRead
);
601 [local] HRESULT BeginRead
([in] BYTE *pb
, [in] ULONG cb
, [in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
602 [local] HRESULT EndRead
([in] IMFAsyncResult
*pResult
, [out] ULONG
*pcbRead
);
603 [local] HRESULT Write
([in] const BYTE *pb
, [in] ULONG cb
, [out] ULONG
*pcbWritten
);
604 [local] HRESULT BeginWrite
([in] const BYTE *pb
, [in] ULONG cb
, [in] IMFAsyncCallback
*pCallback
, [in] IUnknown
*punkState
);
605 [local] HRESULT EndWrite
([in] IMFAsyncResult
*pResult
, [out] ULONG
*pcbWritten
);
606 [local] HRESULT Seek
([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin
, [in] LONGLONG llSeekOffset
, [in] DWORD dwSeekFlags
,
607 [out] QWORD
*pqwCurrentPosition
);
613 cpp_quote
("#define MFBYTESTREAM_IS_READABLE 0x00000001")
614 cpp_quote
("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
615 cpp_quote
("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
616 cpp_quote
("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
617 cpp_quote
("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
618 cpp_quote
("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
619 cpp_quote
("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
620 cpp_quote
("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
621 cpp_quote
("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
623 cpp_quote
("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
625 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
626 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
627 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
628 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
629 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
630 cpp_quote
("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
632 typedef enum MF_FILE_ACCESSMODE
{
633 MF_ACCESSMODE_READ
= 1,
634 MF_ACCESSMODE_WRITE
= 2,
635 MF_ACCESSMODE_READWRITE
= 3
636 } MF_FILE_ACCESSMODE
;
639 MF_OPENMODE_FAIL_IF_NOT_EXIST
= 0,
640 MF_OPENMODE_FAIL_IF_EXIST
= 1,
641 MF_OPENMODE_RESET_IF_EXIST
= 2,
642 MF_OPENMODE_APPEND_IF_EXIST
= 3,
643 MF_OPENMODE_DELETE_IF_EXIST
= 4
647 MF_FILEFLAGS_NONE
= 0x00000000,
648 MF_FILEFLAGS_NOBUFFERING
= 0x00000001,
649 MF_FILEFLAGS_ALLOW_WRITE_SHARING
= 0x00000002
654 uuid(8feed468
-6f7e
-440d
-869a
-49bdd283ad0d
),
656 interface IMFSampleOutputStream
: IUnknown
658 HRESULT BeginWriteSample
(
659 [in] IMFSample
*sample
,
660 [in] IMFAsyncCallback
*callback,
661 [in] IUnknown
*state
);
663 HRESULT EndWriteSample
(
664 [in] IMFAsyncResult
*result
);
671 uuid(5bc8a76b
-869a
-46a3
-9b03
-fa218a66aebe
)
673 interface IMFCollection
: IUnknown
675 HRESULT GetElementCount
([out] DWORD
*pcElements
);
676 HRESULT GetElement
([in] DWORD dwElementIndex
, [out] IUnknown
**ppUnkElement
);
677 HRESULT AddElement
([in] IUnknown
*pUnkElement
);
678 HRESULT RemoveElement
([in] DWORD dwElementIndex
, [out] IUnknown
**ppUnkElement
);
679 HRESULT InsertElementAt
([in] DWORD dwIndex
, [in] IUnknown
*pUnknown
);
680 HRESULT RemoveAllElements
();
685 uuid(7fee9e9a
-4a89
-47a6
-899c
-b6a53a70fb67
),
686 pointer_default(unique)
688 interface IMFActivate
: IMFAttributes
690 HRESULT ActivateObject
([in] REFIID riid
, [out, iid_is(riid
), retval] void **ppv
);
691 HRESULT ShutdownObject
();
692 HRESULT DetachObject
();
695 typedef enum _MF_Plugin_Type
{
696 MF_Plugin_Type_MFT
= 0,
697 MF_Plugin_Type_MediaSource
= 1
703 uuid(5c6c44bf
-1db6
-435b
-9249-e8cd10fdec96
),
704 pointer_default(unique)
706 interface IMFPluginControl
: IUnknown
708 HRESULT GetPreferredClsid
(DWORD pluginType
, LPCWSTR selector
, CLSID
*clsid
);
709 HRESULT GetPreferredClsidByIndex
(DWORD pluginType
, DWORD index
, LPWSTR
*selector
, CLSID
*clsid
);
710 HRESULT SetPreferredClsid
(DWORD pluginType
, LPCWSTR selector
, const CLSID
*clsid
);
711 HRESULT IsDisabled
(DWORD pluginType
, REFCLSID clsid
);
712 HRESULT GetDisabledByIndex
(DWORD pluginType
, DWORD index
, CLSID
*clsid
);
713 HRESULT SetDisabled
(DWORD pluginType
, REFCLSID clsid
, BOOL disabled
);
718 uuid(36f846fc
-2256-48b6
-b58e
-e2b638316581
),
721 interface IMFMediaEventQueue
: IUnknown
723 HRESULT GetEvent
([in] DWORD flags
, [out] IMFMediaEvent
**event
);
724 HRESULT BeginGetEvent
([in] IMFAsyncCallback
*callback, [in] IUnknown
*state
);
725 HRESULT EndGetEvent
([in] IMFAsyncResult
*result
, [out] IMFMediaEvent
**event
);
726 HRESULT QueueEvent
([in] IMFMediaEvent
*event
);
727 HRESULT QueueEventParamVar
([in] MediaEventType met
, [in] REFGUID type
,
728 [in] HRESULT status
, [in, unique] const PROPVARIANT
*value
);
729 HRESULT QueueEventParamUnk
([in] MediaEventType met
, [in] REFGUID type
,
730 [in] HRESULT status
, [in, unique] IUnknown
*unk
);
736 uuid(eb533d5d
-2db6
-40f8
-97a9
-494692014f07
),
738 pointer_default(unique)
740 interface IMFDXGIDeviceManager
: IUnknown
742 HRESULT CloseDeviceHandle
([in] HANDLE device
);
743 HRESULT GetVideoService
([in] HANDLE device
, [in] REFIID riid
, [out] void **service
);
744 HRESULT LockDevice
([in] HANDLE device
, [in] REFIID riid
, [out] void **ppv
, [in] BOOL block
);
745 HRESULT OpenDeviceHandle
([out] HANDLE *device
);
746 HRESULT ResetDevice
([in] IUnknown
*device
, [in] UINT token
);
747 HRESULT TestDevice
([in] HANDLE device
);
748 HRESULT UnlockDevice
([in] HANDLE device
, [in] BOOL state
);