dinput: Avoid deadlock when CS are acquired in different order.
[wine.git] / include / mfobjects.idl
blob0cc8f422da4721877ba0feaa2758eb2500837fbc
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);
145 object,
146 uuid(44ae0fa8-ea31-4109-8d2e-4cae4997c555),
147 local
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")
164 object,
165 uuid(26a0adc3-ce26-4672-9304-69552edd3faf),
166 local
168 interface IMFAudioMediaType : IMFMediaType
170 const WAVEFORMATEX *GetAudioFormat();
173 typedef struct {
174 GUID guidMajorType;
175 GUID guidSubtype;
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
199 } MFVideoFlags;
201 typedef struct _MFRatio {
202 DWORD Numerator;
203 DWORD Denominator;
204 } MFRatio;
206 typedef struct _MFOffset {
207 WORD fract;
208 short value;
209 } MFOffset;
211 typedef struct _MFVideoArea {
212 MFOffset OffsetX;
213 MFOffset OffsetY;
214 SIZE Area;
215 } 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
291 } MFVideoPrimaries;
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
301 } MFVideoLighting;
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
311 } MFNominalRange;
313 typedef struct _MFVideoInfo {
314 DWORD dwWidth;
315 DWORD dwHeight;
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;
329 } MFVideoInfo;
331 typedef struct _MFVideoCompressedInfo {
332 LONGLONG AvgBitrate;
333 LONGLONG AvgBitErrorRate;
334 DWORD MaxKeyFrameSpacing;
335 } MFVideoCompressedInfo;
337 typedef struct _MFARGB {
338 BYTE rgbBlue;
339 BYTE rgbGreen;
340 BYTE rgbRed;
341 BYTE rgbAlpha;
342 } MFARGB;
344 typedef struct __MFAYUVSample {
345 BYTE bCrValue;
346 BYTE bCbValue;
347 BYTE bYValue;
348 BYTE bSampleAlpha8;
349 } MFAYUVSample;
351 typedef union _MFPaletteEntry {
352 MFARGB ARGB;
353 MFAYUVSample AYCbCr;
354 } MFPaletteEntry;
356 typedef struct _MFVideoSurfaceInfo {
357 DWORD Format;
358 DWORD PaletteEntries;
359 MFPaletteEntry Palette[];
360 } MFVideoSurfaceInfo;
362 typedef struct _MFVIDEOFORMAT {
363 DWORD dwSize;
364 MFVideoInfo videoInfo;
365 GUID guidFormat;
366 MFVideoCompressedInfo compressedInfo;
367 MFVideoSurfaceInfo surfaceInfo;
368 } MFVIDEOFORMAT;
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;
384 object,
385 uuid(b99f381f-a8f9-47a2-a5af-ca3a225a3890),
386 local
388 interface IMFVideoMediaType : IMFMediaType
390 const MFVIDEOFORMAT *GetVideoFormat();
392 HRESULT GetVideoRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation,
393 [in] LONG lStride);
397 object,
398 uuid(ac6b7889-0740-4d51-8619-905994a55cc6)
400 interface IMFAsyncResult : IUnknown
402 HRESULT GetState([out] IUnknown **ppunkState);
403 HRESULT GetStatus();
404 HRESULT SetStatus([in] HRESULT hrStatus);
405 HRESULT GetObject([out] IUnknown **ppObject);
406 [local] IUnknown *GetStateNoAddRef();
410 object,
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);
420 object,
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 0x0001")
429 cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x0002" )
431 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
432 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
433 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
434 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
435 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
436 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_MULTITHREADED 0x00000005")
437 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
438 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
439 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
441 enum {
442 MEUnknown = 0,
443 MEError = 1,
444 MEExtendedType = 2,
445 MENonFatalError = 3,
446 MEGenericV1Anchor = MENonFatalError,
447 MESessionUnknown = 100,
448 MESessionTopologySet = 101,
449 MESessionTopologiesCleared = 102,
450 MESessionStarted = 103,
451 MESessionPaused = 104,
452 MESessionStopped = 105,
453 MESessionClosed = 106,
454 MESessionEnded = 107,
455 MESessionRateChanged = 108,
456 MESessionScrubSampleComplete = 109,
457 MESessionCapabilitiesChanged = 110,
458 MESessionTopologyStatus = 111,
459 MESessionNotifyPresentationTime = 112,
460 MENewPresentation = 113,
461 MELicenseAcquisitionStart = 114,
462 MELicenseAcquisitionCompleted = 115,
463 MEIndividualizationStart = 116,
464 MEIndividualizationCompleted = 117,
465 MEEnablerProgress = 118,
466 MEEnablerCompleted = 119,
467 MEPolicyError = 120,
468 MEPolicyReport = 121,
469 MEBufferingStarted = 122,
470 MEBufferingStopped = 123,
471 MEConnectStart = 124,
472 MEConnectEnd = 125,
473 MEReconnectStart = 126,
474 MEReconnectEnd = 127,
475 MERendererEvent = 128,
476 MESessionStreamSinkFormatChanged = 129,
477 MESessionV1Anchor = MESessionStreamSinkFormatChanged,
478 MESourceUnknown = 200,
479 MESourceStarted = 201,
480 MEStreamStarted = 202,
481 MESourceSeeked = 203,
482 MEStreamSeeked = 204,
483 MENewStream = 205,
484 MEUpdatedStream = 206,
485 MESourceStopped = 207,
486 MEStreamStopped = 208,
487 MESourcePaused = 209,
488 MEStreamPaused = 210,
489 MEEndOfPresentation = 211,
490 MEEndOfStream = 212,
491 MEMediaSample = 213,
492 MEStreamTick = 214,
493 MEStreamThinMode = 215,
494 MEStreamFormatChanged = 216,
495 MESourceRateChanged = 217,
496 MEEndOfPresentationSegment = 218,
497 MESourceCharacteristicsChanged = 219,
498 MESourceRateChangeRequested = 220,
499 MESourceMetadataChanged = 221,
500 MESequencerSourceTopologyUpdated = 222,
501 MESourceV1Anchor = MESequencerSourceTopologyUpdated,
502 MESinkUnknown = 300,
503 MEStreamSinkStarted = 301,
504 MEStreamSinkStopped = 302,
505 MEStreamSinkPaused = 303,
506 MEStreamSinkRateChanged = 304,
507 MEStreamSinkRequestSample = 305,
508 MEStreamSinkMarker = 306,
509 MEStreamSinkPrerolled = 307,
510 MEStreamSinkScrubSampleComplete = 308,
511 MEStreamSinkFormatChanged = 309,
512 MEStreamSinkDeviceChanged = 310,
513 MEQualityNotify = 311,
514 MESinkInvalidated = 312,
515 MEAudioSessionNameChanged = 313,
516 MEAudioSessionVolumeChanged = 314,
517 MEAudioSessionDeviceRemoved = 315,
518 MEAudioSessionServerShutdown = 316,
519 MEAudioSessionGroupingParamChanged = 317,
520 MEAudioSessionIconChanged = 318,
521 MEAudioSessionFormatChanged = 319,
522 MEAudioSessionDisconnected = 320,
523 MEAudioSessionExclusiveModeOverride = 321,
524 MESinkV1Anchor = MEAudioSessionExclusiveModeOverride,
525 METrustUnknown = 400,
526 MEPolicyChanged = 401,
527 MEContentProtectionMessage = 402,
528 MEPolicySet = 403,
529 METrustV1Anchor = MEPolicySet,
530 MEWMDRMLicenseBackupCompleted = 500,
531 MEWMDRMLicenseBackupProgress = 501,
532 MEWMDRMLicenseRestoreCompleted = 502,
533 MEWMDRMLicenseRestoreProgress = 503,
534 MEWMDRMLicenseAcquisitionCompleted = 506,
535 MEWMDRMIndividualizationCompleted = 508,
536 MEWMDRMIndividualizationProgress = 513,
537 MEWMDRMProximityCompleted = 514,
538 MEWMDRMLicenseStoreCleaned = 515,
539 MEWMDRMRevocationDownloadCompleted = 516,
540 MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted,
541 MEReservedMax = 10000
544 typedef DWORD MediaEventType;
547 object,
548 uuid(df598932-f10c-4e39-bba2-c308f101daa3)
550 interface IMFMediaEvent : IMFAttributes
552 HRESULT GetType([out] MediaEventType *pmet);
553 HRESULT GetExtendedType([out] GUID *pguidExtendedType);
554 HRESULT GetStatus([out] HRESULT *phrStatus);
555 HRESULT GetValue([out] PROPVARIANT *pvValue);
558 cpp_quote("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
561 object,
562 uuid(2cd0bd52-bcd5-4b89-b62c-eadc0c031e7d)
564 interface IMFMediaEventGenerator : IUnknown
566 HRESULT GetEvent([in] DWORD dwFlags, [out] IMFMediaEvent **ppEvent);
568 [local] HRESULT BeginGetEvent([in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
569 [call_as(BeginGetEvent)] HRESULT RemoteBeginGetEvent([in] IMFRemoteAsyncCallback *pCallback);
571 [local] HRESULT EndGetEvent([in] IMFAsyncResult *pResult, [out] IMFMediaEvent **ppEvent);
572 [call_as(EndGetEvent)] HRESULT RemoteEndGetEvent([in] IUnknown *pResult, [out] DWORD *pcbEvent,
573 [out, size_is(,*pcbEvent)] BYTE **ppbEvent);
575 HRESULT QueueEvent([in] MediaEventType met, [in] REFGUID guidExtendedType, [in] HRESULT hrStatus,
576 [in, unique] const PROPVARIANT *pvValue);
579 typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
580 msoBegin,
581 msoCurrent
582 } MFBYTESTREAM_SEEK_ORIGIN;
585 object,
586 uuid(ad4c1b00-4bf7-422f-9175-756693d9130d),
588 interface IMFByteStream : IUnknown
590 HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
591 HRESULT GetLength([out] QWORD *pqwLength);
592 HRESULT SetLength([in] QWORD qwLength);
593 HRESULT GetCurrentPosition([out] QWORD *pqwPosition);
594 HRESULT SetCurrentPosition([in] QWORD qwPosition);
595 HRESULT IsEndOfStream([out] BOOL *pfEndOfStream);
597 [local] HRESULT Read([in] BYTE* pb, [in] ULONG cb, [out] ULONG *pcbRead);
598 [local] HRESULT BeginRead([in] BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
599 [local] HRESULT EndRead([in] IMFAsyncResult *pResult, [out] ULONG *pcbRead);
600 [local] HRESULT Write([in] const BYTE *pb, [in] ULONG cb, [out] ULONG *pcbWritten);
601 [local] HRESULT BeginWrite([in] const BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
602 [local] HRESULT EndWrite([in] IMFAsyncResult *pResult, [out] ULONG *pcbWritten);
603 [local] HRESULT Seek([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, [in] LONGLONG llSeekOffset, [in] DWORD dwSeekFlags,
604 [out] QWORD *pqwCurrentPosition);
606 HRESULT Flush();
607 HRESULT Close();
610 cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
611 cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
612 cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
613 cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
614 cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
615 cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
616 cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
617 cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
618 cpp_quote("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
620 cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
622 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
623 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
624 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
625 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
626 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
627 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
629 typedef enum MF_FILE_ACCESSMODE {
630 MF_ACCESSMODE_READ = 1,
631 MF_ACCESSMODE_WRITE = 2,
632 MF_ACCESSMODE_READWRITE = 3
633 } MF_FILE_ACCESSMODE;
635 typedef enum {
636 MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
637 MF_OPENMODE_FAIL_IF_EXIST = 1,
638 MF_OPENMODE_RESET_IF_EXIST = 2,
639 MF_OPENMODE_APPEND_IF_EXIST = 3,
640 MF_OPENMODE_DELETE_IF_EXIST = 4
641 } MF_FILE_OPENMODE;
643 typedef enum {
644 MF_FILEFLAGS_NONE = 0x00000000,
645 MF_FILEFLAGS_NOBUFFERING = 0x00000001,
646 MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
647 } MF_FILE_FLAGS;
650 object,
651 uuid(8feed468-6f7e-440d-869a-49bdd283ad0d),
653 interface IMFSampleOutputStream : IUnknown
655 HRESULT BeginWriteSample(
656 [in] IMFSample *sample,
657 [in] IMFAsyncCallback *callback,
658 [in] IUnknown *state);
660 HRESULT EndWriteSample(
661 [in] IMFAsyncResult *result);
663 HRESULT Close();
667 object,
668 uuid(5bc8a76b-869a-46a3-9b03-fa218a66aebe)
670 interface IMFCollection : IUnknown
672 HRESULT GetElementCount([out] DWORD *pcElements);
673 HRESULT GetElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
674 HRESULT AddElement([in] IUnknown *pUnkElement);
675 HRESULT RemoveElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
676 HRESULT InsertElementAt([in] DWORD dwIndex, [in] IUnknown *pUnknown);
677 HRESULT RemoveAllElements();
681 object,
682 uuid(7fee9e9a-4a89-47a6-899c-b6a53a70fb67),
683 pointer_default(unique)
685 interface IMFActivate : IMFAttributes
687 HRESULT ActivateObject([in] REFIID riid, [out, iid_is(riid), retval] void **ppv);
688 HRESULT ShutdownObject();
689 HRESULT DetachObject();
692 typedef enum _MF_Plugin_Type {
693 MF_Plugin_Type_MFT = 0,
694 MF_Plugin_Type_MediaSource = 1
695 } MF_Plugin_Type;
698 object,
699 local,
700 uuid(5c6c44bf-1db6-435b-9249-e8cd10fdec96),
701 pointer_default(unique)
703 interface IMFPluginControl : IUnknown
705 HRESULT GetPreferredClsid(DWORD pluginType, LPCWSTR selector, CLSID *clsid);
706 HRESULT GetPreferredClsidByIndex(DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
707 HRESULT SetPreferredClsid(DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
708 HRESULT IsDisabled(DWORD pluginType, REFCLSID clsid);
709 HRESULT GetDisabledByIndex(DWORD pluginType, DWORD index, CLSID *clsid);
710 HRESULT SetDisabled(DWORD pluginType, REFCLSID clsid, BOOL disabled);
714 object,
715 uuid(36f846fc-2256-48b6-b58e-e2b638316581),
716 local
718 interface IMFMediaEventQueue : IUnknown
720 HRESULT GetEvent([in] DWORD flags, [out] IMFMediaEvent **event);
721 HRESULT BeginGetEvent([in] IMFAsyncCallback *callback, [in] IUnknown *state);
722 HRESULT EndGetEvent([in] IMFAsyncResult *result, [out] IMFMediaEvent **event);
723 HRESULT QueueEvent([in] IMFMediaEvent *event);
724 HRESULT QueueEventParamVar([in] MediaEventType met, [in] REFGUID type,
725 [in] HRESULT status, [in, unique] const PROPVARIANT *value);
726 HRESULT QueueEventParamUnk([in] MediaEventType met, [in] REFGUID type,
727 [in] HRESULT status, [in, unique] IUnknown *unk);
728 HRESULT Shutdown();