TESTING -- override pthreads to fix gstreamer v5
[wine/multimedia.git] / include / mfobjects.idl
blob467535dbd8e1cd1414de02f9f2ac30c0e1e5163c
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_Last,
274 MFVideoTransferMatrix_ForceDWORD = 0x7fffffff
275 } MFVideoTransferMatrix;
277 typedef enum _MFVideoPrimaries {
278 MFVideoPrimaries_Unknown = 0,
279 MFVideoPrimaries_reserved = 1,
280 MFVideoPrimaries_BT709 = 2,
281 MFVideoPrimaries_BT470_2_SysM = 3,
282 MFVideoPrimaries_BT470_2_SysBG = 4,
283 MFVideoPrimaries_SMPTE170M = 5,
284 MFVideoPrimaries_SMPTE240M = 6,
285 MFVideoPrimaries_EBU3213 = 7,
286 MFVideoPrimaries_SMPTE_C = 8,
287 MFVideoPrimaries_Last,
288 MFVideoPrimaries_ForceDWORD = 0x7fffffff
289 } MFVideoPrimaries;
291 typedef enum _MFVideoLighting {
292 MFVideoLighting_Unknown = 0,
293 MFVideoLighting_bright = 1,
294 MFVideoLighting_office = 2,
295 MFVideoLighting_dim = 3,
296 MFVideoLighting_dark = 4,
297 MFVideoLighting_Last,
298 MFVideoLighting_ForceDWORD = 0x7fffffff
299 } MFVideoLighting;
301 typedef enum _MFNominalRange {
302 MFNominalRange_Unknown = 0,
303 MFNominalRange_Normal = 1,
304 MFNominalRange_Wide = 2,
305 MFNominalRange_0_255 = 1,
306 MFNominalRange_16_235 = 2,
307 MFNominalRange_48_208 = 3,
308 MFNominalRange_64_127 = 4
309 } MFNominalRange;
311 typedef struct _MFVideoInfo {
312 DWORD dwWidth;
313 DWORD dwHeight;
314 MFRatio PixelAspectRatio;
315 MFVideoChromaSubsampling SourceChromaSubsampling;
316 MFVideoInterlaceMode InterlaceMode;
317 MFVideoTransferFunction TransferFunction;
318 MFVideoPrimaries ColorPrimaries;
319 MFVideoTransferMatrix TransferMatrix;
320 MFVideoLighting SourceLighting;
321 MFRatio FramesPerSecond;
322 MFNominalRange NominalRange;
323 MFVideoArea GeometricAperture;
324 MFVideoArea MinimumDisplayAperture;
325 MFVideoArea PanScanAperture;
326 unsigned __int64 VideoFlags;
327 } MFVideoInfo;
329 typedef struct _MFVideoCompressedInfo {
330 LONGLONG AvgBitrate;
331 LONGLONG AvgBitErrorRate;
332 DWORD MaxKeyFrameSpacing;
333 } MFVideoCompressedInfo;
335 typedef struct _MFARGB {
336 BYTE rgbBlue;
337 BYTE rgbGreen;
338 BYTE rgbRed;
339 BYTE rgbAlpha;
340 } MFARGB;
342 typedef struct __MFAYUVSample {
343 BYTE bCrValue;
344 BYTE bCbValue;
345 BYTE bYValue;
346 BYTE bSampleAlpha8;
347 } MFAYUVSample;
349 typedef union _MFPaletteEntry {
350 MFARGB ARGB;
351 MFAYUVSample AYCbCr;
352 } MFPaletteEntry;
354 typedef struct _MFVideoSurfaceInfo {
355 DWORD Format;
356 DWORD PaletteEntries;
357 MFPaletteEntry Palette[];
358 } MFVideoSurfaceInfo;
360 typedef struct _MFVIDEOFORMAT {
361 DWORD dwSize;
362 MFVideoInfo videoInfo;
363 GUID guidFormat;
364 MFVideoCompressedInfo compressedInfo;
365 MFVideoSurfaceInfo surfaceInfo;
366 } MFVIDEOFORMAT;
368 typedef enum _MFStandardVideoFormat {
369 MFStdVideoFormat_reserved = 0,
370 MFStdVideoFormat_NTSC,
371 MFStdVideoFormat_PAL,
372 MFStdVideoFormat_DVD_NTSC,
373 MFStdVideoFormat_DVD_PAL,
374 MFStdVideoFormat_DV_PAL,
375 MFStdVideoFormat_DV_NTSC,
376 MFStdVideoFormat_ATSC_SD480i,
377 MFStdVideoFormat_ATSC_HD1080i,
378 MFStdVideoFormat_ATSC_HD720p
379 } MFStandardVideoFormat;
382 object,
383 uuid(b99f381f-a8f9-47a2-a5af-ca3a225a3890),
384 local
386 interface IMFVideoMediaType : IMFMediaType
388 const MFVIDEOFORMAT *GetVideoFormat();
390 HRESULT GetVideoRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation,
391 [in] LONG lStride);
395 object,
396 uuid(ac6b7889-0740-4d51-8619-905994a55cc6)
398 interface IMFAsyncResult : IUnknown
400 HRESULT GetState([out] IUnknown **ppunkState);
401 HRESULT GetStatus();
402 HRESULT SetStatus([in] HRESULT hrStatus);
403 HRESULT GetObject([out] IUnknown **ppObject);
404 [local] IUnknown *GetStateNoAddRef();
408 object,
409 uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
411 interface IMFAsyncCallback : IUnknown
413 HRESULT GetParameters([out] DWORD *pdwFlags, [out] DWORD *pdwQueue);
414 HRESULT Invoke([in] IMFAsyncResult *pAsyncResult);
418 object,
419 uuid(a27003d0-2354-4f2a-8d6a-ab7cff15437e),
421 interface IMFRemoteAsyncCallback : IUnknown
423 HRESULT Invoke([in] HRESULT hr, [in] IUnknown *pRemoteResult);
426 cpp_quote("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x0001")
427 cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x0002" )
429 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
430 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
431 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
432 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
433 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
434 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
435 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
436 cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
438 typedef DWORD MediaEventType;
441 object,
442 uuid(df598932-f10c-4e39-bba2-c308f101daa3)
444 interface IMFMediaEvent : IMFAttributes
446 HRESULT GetType([out] MediaEventType *pmet);
447 HRESULT GetExtendedType([out] GUID *pguidExtendedType);
448 HRESULT GetStatus([out] HRESULT *phrStatus);
449 HRESULT GetValue([out] PROPVARIANT *pvValue);
453 object,
454 uuid(2cd0bd52-bcd5-4b89-b62c-eadc0c031e7d)
456 interface IMFMediaEventGenerator : IUnknown
458 HRESULT GetEvent([in] DWORD dwFlags, [out] IMFMediaEvent **ppEvent);
460 [local] HRESULT BeginGetEvent([in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
461 [call_as(BeginGetEvent)] HRESULT RemoteBeginGetEvent([in] IMFRemoteAsyncCallback *pCallback);
463 [local] HRESULT EndGetEvent([in] IMFAsyncResult *pResult, [out] IMFMediaEvent **ppEvent);
464 [call_as(EndGetEvent)] HRESULT RemoteEndGetEvent([in] IUnknown *pResult, [out] DWORD *pcbEvent,
465 [out, size_is(,*pcbEvent)] BYTE **ppbEvent);
467 HRESULT QueueEvent([in] MediaEventType met, [in] REFGUID guidExtendedType, [in] HRESULT hrStatus,
468 [in, unique] const PROPVARIANT *pvValue);
471 typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
472 msoBegin,
473 msoCurrent
474 } MFBYTESTREAM_SEEK_ORIGIN;
477 object,
478 uuid(ad4c1b00-4bf7-422f-9175-756693d9130d),
480 interface IMFByteStream : IUnknown
482 HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
483 HRESULT GetLength([out] QWORD *pqwLength);
484 HRESULT SetLength([in] QWORD qwLength);
485 HRESULT GetCurrentPosition([out] QWORD *pqwPosition);
486 HRESULT SetCurrentPosition([in] QWORD qwPosition);
487 HRESULT IsEndOfStream([out] BOOL *pfEndOfStream);
489 [local] HRESULT Read([in] BYTE* pb, [in] ULONG cb, [out] ULONG *pcbRead);
490 [local] HRESULT BeginRead([in] BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
491 [local] HRESULT EndRead([in] IMFAsyncResult *pResult, [out] ULONG *pcbRead);
492 [local] HRESULT Write([in] const BYTE *pb, [in] ULONG cb, [out] ULONG *pcbWritten);
493 [local] HRESULT BeginWrite([in] const BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
494 [local] HRESULT EndWrite([in] IMFAsyncResult *pResult, [out] ULONG *pcbWritten);
495 [local] HRESULT Seek([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, [in] LONGLONG llSeekOffset, [in] DWORD dwSeekFlags,
496 [out] QWORD *pqwCurrentPosition);
498 HRESULT Flush();
499 HRESULT Close();
502 cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
503 cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
504 cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
505 cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
506 cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
507 cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
508 cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
509 cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
511 cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
513 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
514 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
515 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
516 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
517 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
518 cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
520 typedef enum MF_FILE_ACCESSMODE {
521 MF_ACCESSMODE_READ = 1,
522 MF_ACCESSMODE_WRITE = 2,
523 MF_ACCESSMODE_READWRITE = 3
524 } MF_FILE_ACCESSMODE;
526 typedef enum {
527 MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
528 MF_OPENMODE_FAIL_IF_EXIST = 1,
529 MF_OPENMODE_RESET_IF_EXIST = 2,
530 MF_OPENMODE_APPEND_IF_EXIST = 3,
531 MF_OPENMODE_DELETE_IF_EXIST = 4
532 } MF_FILE_OPENMODE;
534 typedef enum {
535 MF_FILEFLAGS_NONE = 0x00000000,
536 MF_FILEFLAGS_NOBUFFERING = 0x00000001,
537 MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
538 } MF_FILE_FLAGS;
541 object,
542 uuid(5bc8a76b-869a-46a3-9b03-fa218a66aebe)
544 interface IMFCollection : IUnknown
546 HRESULT GetElementCount([out] DWORD *pcElements);
547 HRESULT GetElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
548 HRESULT AddElement([in] IUnknown *pUnkElement);
549 HRESULT RemoveElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
550 HRESULT InsertElementAt([in] DWORD dwIndex, [in] IUnknown *pUnknown);
551 HRESULT RemoveAllElements();
555 object,
556 uuid(7fee9e9a-4a89-47a6-899c-b6a53a70fb67),
557 pointer_default(unique)
559 interface IMFActivate : IMFAttributes
561 HRESULT ActivateObject([in] REFIID riid, [out, iid_is(riid), retval] void **ppv);
562 HRESULT ShutdownObject();
563 HRESULT DetachObject();
566 typedef enum _MF_Plugin_Type {
567 MF_Plugin_Type_MFT = 0,
568 MF_Plugin_Type_MediaSource = 1
569 } MF_Plugin_Type;
572 object,
573 local,
574 uuid(5c6c44bf-1db6-435b-9249-e8cd10fdec96),
575 pointer_default(unique)
577 interface IMFPluginControl : IUnknown
579 HRESULT GetPreferredClsid(DWORD pluginType, LPCWSTR selector, CLSID *clsid);
580 HRESULT GetPreferredClsidByIndex(DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
581 HRESULT SetPreferredClsid(DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
582 HRESULT IsDisabled(DWORD pluginType, REFCLSID clsid);
583 HRESULT GetDisabledByIndex(DWORD pluginType, DWORD index, CLSID *clsid);
584 HRESULT SetDisabled(DWORD pluginType, REFCLSID clsid, BOOL disabled);