wined3d: Specify a wined3d output for swapchain creation.
[wine.git] / include / mfobjects.idl
blobee49be35af0d5cb4fc3b6fd30105b5fa37db586a
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(44ae0fa8-ea31-4109-8d2e-4cae4997c555),
173 local
175 interface IMFMediaType : IMFAttributes
177 HRESULT GetMajorType([out] GUID *pguidMajorType);
178 HRESULT IsCompressedFormat([out] BOOL *pfCompressed);
179 HRESULT IsEqual([in] IMFMediaType *pIMediaType, [out] DWORD *pdwFlags);
180 HRESULT GetRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation);
181 HRESULT FreeRepresentation([in] GUID guidRepresentation, [in] LPVOID pvRepresentation);
184 cpp_quote("#define MF_MEDIATYPE_EQUAL_MAJOR_TYPES 0x00000001")
185 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_TYPES 0x00000002")
186 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_DATA 0x00000004")
187 cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA 0x00000008")
190 object,
191 uuid(26a0adc3-ce26-4672-9304-69552edd3faf),
192 local
194 interface IMFAudioMediaType : IMFMediaType
196 const WAVEFORMATEX *GetAudioFormat();
199 typedef struct {
200 GUID guidMajorType;
201 GUID guidSubtype;
202 } MFT_REGISTER_TYPE_INFO;
204 typedef enum _MFVideoFlags {
205 MFVideoFlag_PAD_TO_Mask = 0x00000003,
206 MFVideoFlag_PAD_TO_None = 0,
207 MFVideoFlag_PAD_TO_4x3 = 0x00000001,
208 MFVideoFlag_PAD_TO_16x9 = 0x00000002,
209 MFVideoFlag_SrcContentHintMask = 0x0000001c,
210 MFVideoFlag_SrcContentHintNone = 0,
211 MFVideoFlag_SrcContentHint16x9 = 0x00000004,
212 MFVideoFlag_SrcContentHint235_1 = 0x00000008,
213 MFVideoFlag_AnalogProtected = 0x00000020,
214 MFVideoFlag_DigitallyProtected = 0x00000040,
215 MFVideoFlag_ProgressiveContent = 0x00000080,
216 MFVideoFlag_FieldRepeatCountMask = 0x00000700,
217 MFVideoFlag_FieldRepeatCountShift = 8,
218 MFVideoFlag_ProgressiveSeqReset = 0x00000800,
219 MFVideoFlag_PanScanEnabled = 0x00020000,
220 MFVideoFlag_LowerFieldFirst = 0x00040000,
221 MFVideoFlag_BottomUpLinearRep = 0x00080000,
222 MFVideoFlags_DXVASurface = 0x00100000,
223 MFVideoFlags_RenderTargetSurface = 0x00400000,
224 MFVideoFlags_ForceQWORD = 0x7fffffff
225 } MFVideoFlags;
227 typedef struct _MFRatio {
228 DWORD Numerator;
229 DWORD Denominator;
230 } MFRatio;
232 typedef struct _MFOffset {
233 WORD fract;
234 short value;
235 } MFOffset;
237 typedef struct _MFVideoArea {
238 MFOffset OffsetX;
239 MFOffset OffsetY;
240 SIZE Area;
241 } MFVideoArea;
243 typedef enum _MFVideoChromaSubsampling {
244 MFVideoChromaSubsampling_Unknown = 0,
245 MFVideoChromaSubsampling_ProgressiveChroma = 0x8,
246 MFVideoChromaSubsampling_Horizontally_Cosited = 0x4,
247 MFVideoChromaSubsampling_Vertically_Cosited = 0x2,
248 MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
249 MFVideoChromaSubsampling_MPEG2
250 = MFVideoChromaSubsampling_Horizontally_Cosited
251 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
252 MFVideoChromaSubsampling_MPEG1
253 = MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
254 MFVideoChromaSubsampling_DV_PAL
255 = MFVideoChromaSubsampling_Horizontally_Cosited
256 | MFVideoChromaSubsampling_Vertically_Cosited,
257 MFVideoChromaSubsampling_Cosited
258 = MFVideoChromaSubsampling_Horizontally_Cosited
259 | MFVideoChromaSubsampling_Vertically_Cosited
260 | MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
261 MFVideoChromaSubsampling_Last = MFVideoChromaSubsampling_Cosited + 1,
262 MFVideoChromaSubsampling_ForceDWORD = 0x7fffffff
263 } MFVideoChromaSubsampling;
265 typedef enum _MFVideoInterlaceMode {
266 MFVideoInterlace_Unknown = 0,
267 MFVideoInterlace_Progressive = 2,
268 MFVideoInterlace_FieldInterleavedUpperFirst = 3,
269 MFVideoInterlace_FieldInterleavedLowerFirst = 4,
270 MFVideoInterlace_FieldSingleUpper = 5,
271 MFVideoInterlace_FieldSingleLower = 6,
272 MFVideoInterlace_MixedInterlaceOrProgressive = 7,
273 MFVideoInterlace_Last,
274 MFVideoInterlace_ForceDWORD = 0x7fffffff
275 } MFVideoInterlaceMode;
277 typedef enum _MFVideoTransferFunction {
278 MFVideoTransFunc_Unknown = 0,
279 MFVideoTransFunc_10 = 1,
280 MFVideoTransFunc_18 = 2,
281 MFVideoTransFunc_20 = 3,
282 MFVideoTransFunc_22 = 4,
283 MFVideoTransFunc_709 = 5,
284 MFVideoTransFunc_240M = 6,
285 MFVideoTransFunc_sRGB = 7,
286 MFVideoTransFunc_28 = 8,
287 MFVideoTransFunc_Log_100 = 9,
288 MFVideoTransFunc_Log_316 = 10,
289 MFVideoTransFunc_709_sym = 11,
290 MFVideoTransFunc_Last,
291 MFVideoTransFunc_ForceDWORD = 0x7fffffff
292 } MFVideoTransferFunction;
294 typedef enum _MFVideoTransferMatrix {
295 MFVideoTransferMatrix_Unknown = 0,
296 MFVideoTransferMatrix_BT709 = 1,
297 MFVideoTransferMatrix_BT601 = 2,
298 MFVideoTransferMatrix_SMPTE240M = 3,
299 MFVideoTransferMatrix_BT2020_10 = 4,
300 MFVideoTransferMatrix_BT2020_12 = 5,
301 MFVideoTransferMatrix_Last,
302 MFVideoTransferMatrix_ForceDWORD = 0x7fffffff
303 } MFVideoTransferMatrix;
305 typedef enum _MFVideoPrimaries {
306 MFVideoPrimaries_Unknown = 0,
307 MFVideoPrimaries_reserved = 1,
308 MFVideoPrimaries_BT709 = 2,
309 MFVideoPrimaries_BT470_2_SysM = 3,
310 MFVideoPrimaries_BT470_2_SysBG = 4,
311 MFVideoPrimaries_SMPTE170M = 5,
312 MFVideoPrimaries_SMPTE240M = 6,
313 MFVideoPrimaries_EBU3213 = 7,
314 MFVideoPrimaries_SMPTE_C = 8,
315 MFVideoPrimaries_Last,
316 MFVideoPrimaries_ForceDWORD = 0x7fffffff
317 } MFVideoPrimaries;
319 typedef enum _MFVideoLighting {
320 MFVideoLighting_Unknown = 0,
321 MFVideoLighting_bright = 1,
322 MFVideoLighting_office = 2,
323 MFVideoLighting_dim = 3,
324 MFVideoLighting_dark = 4,
325 MFVideoLighting_Last,
326 MFVideoLighting_ForceDWORD = 0x7fffffff
327 } MFVideoLighting;
329 typedef enum _MFNominalRange {
330 MFNominalRange_Unknown = 0,
331 MFNominalRange_Normal = 1,
332 MFNominalRange_Wide = 2,
333 MFNominalRange_0_255 = 1,
334 MFNominalRange_16_235 = 2,
335 MFNominalRange_48_208 = 3,
336 MFNominalRange_64_127 = 4
337 } MFNominalRange;
339 typedef struct _MFVideoInfo {
340 DWORD dwWidth;
341 DWORD dwHeight;
342 MFRatio PixelAspectRatio;
343 MFVideoChromaSubsampling SourceChromaSubsampling;
344 MFVideoInterlaceMode InterlaceMode;
345 MFVideoTransferFunction TransferFunction;
346 MFVideoPrimaries ColorPrimaries;
347 MFVideoTransferMatrix TransferMatrix;
348 MFVideoLighting SourceLighting;
349 MFRatio FramesPerSecond;
350 MFNominalRange NominalRange;
351 MFVideoArea GeometricAperture;
352 MFVideoArea MinimumDisplayAperture;
353 MFVideoArea PanScanAperture;
354 unsigned __int64 VideoFlags;
355 } MFVideoInfo;
357 typedef struct _MFVideoCompressedInfo {
358 LONGLONG AvgBitrate;
359 LONGLONG AvgBitErrorRate;
360 DWORD MaxKeyFrameSpacing;
361 } MFVideoCompressedInfo;
363 typedef struct _MFARGB {
364 BYTE rgbBlue;
365 BYTE rgbGreen;
366 BYTE rgbRed;
367 BYTE rgbAlpha;
368 } MFARGB;
370 typedef struct __MFAYUVSample {
371 BYTE bCrValue;
372 BYTE bCbValue;
373 BYTE bYValue;
374 BYTE bSampleAlpha8;
375 } MFAYUVSample;
377 typedef union _MFPaletteEntry {
378 MFARGB ARGB;
379 MFAYUVSample AYCbCr;
380 } MFPaletteEntry;
382 typedef struct _MFVideoSurfaceInfo {
383 DWORD Format;
384 DWORD PaletteEntries;
385 MFPaletteEntry Palette[];
386 } MFVideoSurfaceInfo;
388 typedef struct _MFVIDEOFORMAT {
389 DWORD dwSize;
390 MFVideoInfo videoInfo;
391 GUID guidFormat;
392 MFVideoCompressedInfo compressedInfo;
393 MFVideoSurfaceInfo surfaceInfo;
394 } MFVIDEOFORMAT;
396 typedef enum _MFStandardVideoFormat {
397 MFStdVideoFormat_reserved = 0,
398 MFStdVideoFormat_NTSC,
399 MFStdVideoFormat_PAL,
400 MFStdVideoFormat_DVD_NTSC,
401 MFStdVideoFormat_DVD_PAL,
402 MFStdVideoFormat_DV_PAL,
403 MFStdVideoFormat_DV_NTSC,
404 MFStdVideoFormat_ATSC_SD480i,
405 MFStdVideoFormat_ATSC_HD1080i,
406 MFStdVideoFormat_ATSC_HD720p
407 } MFStandardVideoFormat;
410 object,
411 uuid(b99f381f-a8f9-47a2-a5af-ca3a225a3890),
412 local
414 interface IMFVideoMediaType : IMFMediaType
416 const MFVIDEOFORMAT *GetVideoFormat();
418 HRESULT GetVideoRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation,
419 [in] LONG lStride);
423 object,
424 uuid(ac6b7889-0740-4d51-8619-905994a55cc6)
426 interface IMFAsyncResult : IUnknown
428 HRESULT GetState([out] IUnknown **ppunkState);
429 HRESULT GetStatus();
430 HRESULT SetStatus([in] HRESULT hrStatus);
431 HRESULT GetObject([out] IUnknown **ppObject);
432 [local] IUnknown *GetStateNoAddRef();
436 object,
437 uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
439 interface IMFAsyncCallback : IUnknown
441 HRESULT GetParameters([out] DWORD *pdwFlags, [out] DWORD *pdwQueue);
442 HRESULT Invoke([in] IMFAsyncResult *pAsyncResult);
446 object,
447 uuid(a27003d0-2354-4f2a-8d6a-ab7cff15437e),
449 interface IMFRemoteAsyncCallback : IUnknown
451 HRESULT Invoke([in] HRESULT hr, [in] IUnknown *pRemoteResult);
454 cpp_quote("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x00000001")
455 cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x00000002")
456 cpp_quote("#define MFASYNC_BLOCKING_CALLBACK 0x00000004")
457 cpp_quote("#define MFASYNC_REPLY_CALLBACK 0x00000008")
458 cpp_quote("#define MFASYNC_LOCALIZE_REMOTE_CALLBACK 0x00000010")
460 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
461 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
462 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
463 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
464 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
465 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_MULTITHREADED 0x00000005")
466 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
467 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
468 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
470 enum {
471 MEUnknown = 0,
472 MEError = 1,
473 MEExtendedType = 2,
474 MENonFatalError = 3,
475 MEGenericV1Anchor = MENonFatalError,
476 MESessionUnknown = 100,
477 MESessionTopologySet = 101,
478 MESessionTopologiesCleared = 102,
479 MESessionStarted = 103,
480 MESessionPaused = 104,
481 MESessionStopped = 105,
482 MESessionClosed = 106,
483 MESessionEnded = 107,
484 MESessionRateChanged = 108,
485 MESessionScrubSampleComplete = 109,
486 MESessionCapabilitiesChanged = 110,
487 MESessionTopologyStatus = 111,
488 MESessionNotifyPresentationTime = 112,
489 MENewPresentation = 113,
490 MELicenseAcquisitionStart = 114,
491 MELicenseAcquisitionCompleted = 115,
492 MEIndividualizationStart = 116,
493 MEIndividualizationCompleted = 117,
494 MEEnablerProgress = 118,
495 MEEnablerCompleted = 119,
496 MEPolicyError = 120,
497 MEPolicyReport = 121,
498 MEBufferingStarted = 122,
499 MEBufferingStopped = 123,
500 MEConnectStart = 124,
501 MEConnectEnd = 125,
502 MEReconnectStart = 126,
503 MEReconnectEnd = 127,
504 MERendererEvent = 128,
505 MESessionStreamSinkFormatChanged = 129,
506 MESessionV1Anchor = MESessionStreamSinkFormatChanged,
507 MESourceUnknown = 200,
508 MESourceStarted = 201,
509 MEStreamStarted = 202,
510 MESourceSeeked = 203,
511 MEStreamSeeked = 204,
512 MENewStream = 205,
513 MEUpdatedStream = 206,
514 MESourceStopped = 207,
515 MEStreamStopped = 208,
516 MESourcePaused = 209,
517 MEStreamPaused = 210,
518 MEEndOfPresentation = 211,
519 MEEndOfStream = 212,
520 MEMediaSample = 213,
521 MEStreamTick = 214,
522 MEStreamThinMode = 215,
523 MEStreamFormatChanged = 216,
524 MESourceRateChanged = 217,
525 MEEndOfPresentationSegment = 218,
526 MESourceCharacteristicsChanged = 219,
527 MESourceRateChangeRequested = 220,
528 MESourceMetadataChanged = 221,
529 MESequencerSourceTopologyUpdated = 222,
530 MESourceV1Anchor = MESequencerSourceTopologyUpdated,
531 MESinkUnknown = 300,
532 MEStreamSinkStarted = 301,
533 MEStreamSinkStopped = 302,
534 MEStreamSinkPaused = 303,
535 MEStreamSinkRateChanged = 304,
536 MEStreamSinkRequestSample = 305,
537 MEStreamSinkMarker = 306,
538 MEStreamSinkPrerolled = 307,
539 MEStreamSinkScrubSampleComplete = 308,
540 MEStreamSinkFormatChanged = 309,
541 MEStreamSinkDeviceChanged = 310,
542 MEQualityNotify = 311,
543 MESinkInvalidated = 312,
544 MEAudioSessionNameChanged = 313,
545 MEAudioSessionVolumeChanged = 314,
546 MEAudioSessionDeviceRemoved = 315,
547 MEAudioSessionServerShutdown = 316,
548 MEAudioSessionGroupingParamChanged = 317,
549 MEAudioSessionIconChanged = 318,
550 MEAudioSessionFormatChanged = 319,
551 MEAudioSessionDisconnected = 320,
552 MEAudioSessionExclusiveModeOverride = 321,
553 MESinkV1Anchor = MEAudioSessionExclusiveModeOverride,
554 METrustUnknown = 400,
555 MEPolicyChanged = 401,
556 MEContentProtectionMessage = 402,
557 MEPolicySet = 403,
558 METrustV1Anchor = MEPolicySet,
559 MEWMDRMLicenseBackupCompleted = 500,
560 MEWMDRMLicenseBackupProgress = 501,
561 MEWMDRMLicenseRestoreCompleted = 502,
562 MEWMDRMLicenseRestoreProgress = 503,
563 MEWMDRMLicenseAcquisitionCompleted = 506,
564 MEWMDRMIndividualizationCompleted = 508,
565 MEWMDRMIndividualizationProgress = 513,
566 MEWMDRMProximityCompleted = 514,
567 MEWMDRMLicenseStoreCleaned = 515,
568 MEWMDRMRevocationDownloadCompleted = 516,
569 MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted,
570 METransformUnknown = 600,
571 METransformNeedInput = 601,
572 METransformHaveOutput = 602,
573 METransformDrainComplete = 603,
574 METransformMarker = 604,
575 METransformInputStreamStateChanged = 605,
576 MEByteStreamCharacteristicsChanged = 700,
577 MEVideoCaptureDeviceRemoved = 800,
578 MEVideoCaptureDevicePreempted = 801,
579 MEStreamSinkFormatInvalidated = 802,
580 MEEncodingParameters = 803,
581 MEContentProtectionMetadata = 900,
582 MEDeviceThermalStateChanged = 950,
583 MEReservedMax = 10000
586 typedef DWORD MediaEventType;
589 object,
590 uuid(df598932-f10c-4e39-bba2-c308f101daa3)
592 interface IMFMediaEvent : IMFAttributes
594 HRESULT GetType([out] MediaEventType *pmet);
595 HRESULT GetExtendedType([out] GUID *pguidExtendedType);
596 HRESULT GetStatus([out] HRESULT *phrStatus);
597 HRESULT GetValue([out] PROPVARIANT *pvValue);
600 cpp_quote("#define MF_EVENT_FLAG_NO_WAIT 0x00000001")
603 object,
604 uuid(2cd0bd52-bcd5-4b89-b62c-eadc0c031e7d)
606 interface IMFMediaEventGenerator : IUnknown
608 HRESULT GetEvent([in] DWORD dwFlags, [out] IMFMediaEvent **ppEvent);
610 [local] HRESULT BeginGetEvent([in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
611 [call_as(BeginGetEvent)] HRESULT RemoteBeginGetEvent([in] IMFRemoteAsyncCallback *pCallback);
613 [local] HRESULT EndGetEvent([in] IMFAsyncResult *pResult, [out] IMFMediaEvent **ppEvent);
614 [call_as(EndGetEvent)] HRESULT RemoteEndGetEvent([in] IUnknown *pResult, [out] DWORD *pcbEvent,
615 [out, size_is(,*pcbEvent)] BYTE **ppbEvent);
617 HRESULT QueueEvent([in] MediaEventType met, [in] REFGUID guidExtendedType, [in] HRESULT hrStatus,
618 [in, unique] const PROPVARIANT *pvValue);
621 typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
622 msoBegin,
623 msoCurrent
624 } MFBYTESTREAM_SEEK_ORIGIN;
627 object,
628 uuid(ad4c1b00-4bf7-422f-9175-756693d9130d),
630 interface IMFByteStream : IUnknown
632 HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
633 HRESULT GetLength([out] QWORD *pqwLength);
634 HRESULT SetLength([in] QWORD qwLength);
635 HRESULT GetCurrentPosition([out] QWORD *pqwPosition);
636 HRESULT SetCurrentPosition([in] QWORD qwPosition);
637 HRESULT IsEndOfStream([out] BOOL *pfEndOfStream);
639 [local] HRESULT Read([in] BYTE* pb, [in] ULONG cb, [out] ULONG *pcbRead);
640 [local] HRESULT BeginRead([in] BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
641 [local] HRESULT EndRead([in] IMFAsyncResult *pResult, [out] ULONG *pcbRead);
642 [local] HRESULT Write([in] const BYTE *pb, [in] ULONG cb, [out] ULONG *pcbWritten);
643 [local] HRESULT BeginWrite([in] const BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
644 [local] HRESULT EndWrite([in] IMFAsyncResult *pResult, [out] ULONG *pcbWritten);
645 [local] HRESULT Seek([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, [in] LONGLONG llSeekOffset, [in] DWORD dwSeekFlags,
646 [out] QWORD *pqwCurrentPosition);
648 HRESULT Flush();
649 HRESULT Close();
652 cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
653 cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
654 cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
655 cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
656 cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
657 cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
658 cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
659 cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
660 cpp_quote("#define MFBYTESTREAM_DOES_NOT_USE_NETWORK 0x00000800")
662 cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
664 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
665 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
666 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
667 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
668 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
669 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
671 typedef enum MF_FILE_ACCESSMODE {
672 MF_ACCESSMODE_READ = 1,
673 MF_ACCESSMODE_WRITE = 2,
674 MF_ACCESSMODE_READWRITE = 3
675 } MF_FILE_ACCESSMODE;
677 typedef enum {
678 MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
679 MF_OPENMODE_FAIL_IF_EXIST = 1,
680 MF_OPENMODE_RESET_IF_EXIST = 2,
681 MF_OPENMODE_APPEND_IF_EXIST = 3,
682 MF_OPENMODE_DELETE_IF_EXIST = 4
683 } MF_FILE_OPENMODE;
685 typedef enum {
686 MF_FILEFLAGS_NONE = 0x00000000,
687 MF_FILEFLAGS_NOBUFFERING = 0x00000001,
688 MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
689 } MF_FILE_FLAGS;
692 object,
693 uuid(8feed468-6f7e-440d-869a-49bdd283ad0d),
695 interface IMFSampleOutputStream : IUnknown
697 HRESULT BeginWriteSample(
698 [in] IMFSample *sample,
699 [in] IMFAsyncCallback *callback,
700 [in] IUnknown *state);
702 HRESULT EndWriteSample(
703 [in] IMFAsyncResult *result);
705 HRESULT Close();
709 object,
710 uuid(5bc8a76b-869a-46a3-9b03-fa218a66aebe)
712 interface IMFCollection : IUnknown
714 HRESULT GetElementCount([out] DWORD *pcElements);
715 HRESULT GetElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
716 HRESULT AddElement([in] IUnknown *pUnkElement);
717 HRESULT RemoveElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
718 HRESULT InsertElementAt([in] DWORD dwIndex, [in] IUnknown *pUnknown);
719 HRESULT RemoveAllElements();
723 object,
724 uuid(7fee9e9a-4a89-47a6-899c-b6a53a70fb67),
725 pointer_default(unique)
727 interface IMFActivate : IMFAttributes
729 HRESULT ActivateObject([in] REFIID riid, [out, iid_is(riid), retval] void **ppv);
730 HRESULT ShutdownObject();
731 HRESULT DetachObject();
734 typedef enum _MF_Plugin_Type {
735 MF_Plugin_Type_MFT = 0,
736 MF_Plugin_Type_MediaSource = 1
737 } MF_Plugin_Type;
740 object,
741 local,
742 uuid(5c6c44bf-1db6-435b-9249-e8cd10fdec96),
743 pointer_default(unique)
745 interface IMFPluginControl : IUnknown
747 HRESULT GetPreferredClsid(DWORD pluginType, LPCWSTR selector, CLSID *clsid);
748 HRESULT GetPreferredClsidByIndex(DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
749 HRESULT SetPreferredClsid(DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
750 HRESULT IsDisabled(DWORD pluginType, REFCLSID clsid);
751 HRESULT GetDisabledByIndex(DWORD pluginType, DWORD index, CLSID *clsid);
752 HRESULT SetDisabled(DWORD pluginType, REFCLSID clsid, BOOL disabled);
756 object,
757 uuid(36f846fc-2256-48b6-b58e-e2b638316581),
758 local
760 interface IMFMediaEventQueue : IUnknown
762 HRESULT GetEvent([in] DWORD flags, [out] IMFMediaEvent **event);
763 HRESULT BeginGetEvent([in] IMFAsyncCallback *callback, [in] IUnknown *state);
764 HRESULT EndGetEvent([in] IMFAsyncResult *result, [out] IMFMediaEvent **event);
765 HRESULT QueueEvent([in] IMFMediaEvent *event);
766 HRESULT QueueEventParamVar([in] MediaEventType met, [in] REFGUID type,
767 [in] HRESULT status, [in, unique] const PROPVARIANT *value);
768 HRESULT QueueEventParamUnk([in] MediaEventType met, [in] REFGUID type,
769 [in] HRESULT status, [in, unique] IUnknown *unk);
770 HRESULT Shutdown();
774 object,
775 uuid(eb533d5d-2db6-40f8-97a9-494692014f07),
776 local,
777 pointer_default(unique)
779 interface IMFDXGIDeviceManager : IUnknown
781 HRESULT CloseDeviceHandle([in] HANDLE device);
782 HRESULT GetVideoService([in] HANDLE device, [in] REFIID riid, [out] void **service);
783 HRESULT LockDevice([in] HANDLE device, [in] REFIID riid, [out] void **ppv, [in] BOOL block);
784 HRESULT OpenDeviceHandle([out] HANDLE *device);
785 HRESULT ResetDevice([in] IUnknown *device, [in] UINT token);
786 HRESULT TestDevice([in] HANDLE device);
787 HRESULT UnlockDevice([in] HANDLE device, [in] BOOL state);