msvcr120: Add stub for _SetWinRTOutOfMemoryExceptionCallback.
[wine.git] / include / mfreadwrite.idl
blob8547b80e02cb6010ddbc007d6a3ef094eb3c7ef5
1 /*
2 * Copyright (C) 2017 Alistair Leslie-Hughes
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 "mfobjects.idl";
20 import "mftransform.idl";
22 enum
24 MF_SOURCE_READER_INVALID_STREAM_INDEX = 0xffffffff,
25 MF_SOURCE_READER_ALL_STREAMS = 0xfffffffe,
26 MF_SOURCE_READER_ANY_STREAM = 0xfffffffe,
27 MF_SOURCE_READER_FIRST_AUDIO_STREAM = 0xfffffffd,
28 MF_SOURCE_READER_FIRST_VIDEO_STREAM = 0xfffffffc,
29 MF_SOURCE_READER_MEDIASOURCE = 0xffffffff,
30 MF_SOURCE_READER_CURRENT_TYPE_INDEX = 0xffffffff
33 typedef enum MF_SOURCE_READER_FLAG
35 MF_SOURCE_READERF_ERROR = 0x001,
36 MF_SOURCE_READERF_ENDOFSTREAM = 0x002,
37 MF_SOURCE_READERF_NEWSTREAM = 0x004,
38 MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED = 0x010,
39 MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED = 0x020,
40 MF_SOURCE_READERF_STREAMTICK = 0x100,
41 MF_SOURCE_READERF_ALLEFFECTSREMOVED = 0x200
42 } MF_SOURCE_READER_FLAG;
44 typedef struct _MF_SINK_WRITER_STATISTICS
46 DWORD cb;
47 LONGLONG llLastTimestampReceived;
48 LONGLONG llLastTimestampEncoded;
49 LONGLONG llLastTimestampProcessed;
50 LONGLONG llLastStreamTickReceived;
51 LONGLONG llLastSinkSampleRequest;
52 QWORD qwNumSamplesReceived;
53 QWORD qwNumSamplesEncoded;
54 QWORD qwNumSamplesProcessed;
55 QWORD qwNumStreamTicksReceived;
56 DWORD dwByteCountQueued;
57 QWORD qwByteCountProcessed;
58 DWORD dwNumOutstandingSinkSampleRequests;
59 DWORD dwAverageSampleRateReceived;
60 DWORD dwAverageSampleRateEncoded;
61 DWORD dwAverageSampleRateProcessed;
62 } MF_SINK_WRITER_STATISTICS;
64 cpp_quote("EXTERN_GUID(CLSID_MFReadWriteClassFactory, 0x48e2ed0f, 0x98c2, 0x4a37, 0xbe, 0xd5, 0x16, 0x63, 0x12, 0xdd, 0xd8, 0x3f);")
65 cpp_quote("EXTERN_GUID(CLSID_MFSourceReader, 0x1777133c, 0x0881, 0x411b, 0xa5, 0x77, 0xad, 0x54, 0x5f, 0x07, 0x14, 0xc4);")
66 cpp_quote("EXTERN_GUID(CLSID_MFSinkWriter, 0xa3bbfb17, 0x8273, 0x4e52, 0x9e, 0x0e, 0x97, 0x39, 0xdc, 0x88, 0x79, 0x90);")
68 cpp_quote("EXTERN_GUID(MF_SINK_WRITER_ASYNC_CALLBACK, 0x48cb183e, 0x7b0b, 0x46f4, 0x82, 0x2e, 0x5e, 0x1d, 0x2d, 0xda, 0x43, 0x54);")
69 cpp_quote("EXTERN_GUID(MF_SINK_WRITER_DISABLE_THROTTLING, 0x08b845d8, 0x2b74, 0x4afe, 0x9d, 0x53, 0xbe, 0x16, 0xd2, 0xd5, 0xae, 0x4f);")
70 cpp_quote("EXTERN_GUID(MF_SINK_WRITER_D3D_MANAGER, 0xec822da2, 0xe1e9, 0x4b29, 0xa0, 0xd8, 0x56, 0x3c, 0x71, 0x9f, 0x52, 0x69);")
71 cpp_quote("EXTERN_GUID(MF_SINK_WRITER_ENCODER_CONFIG, 0xad91cd04, 0xa7cc, 0x4ac7, 0x99, 0xb6, 0xa5, 0x7b, 0x9a, 0x4a, 0x7c, 0x70);")
73 cpp_quote("EXTERN_GUID(MF_READWRITE_DISABLE_CONVERTERS, 0x98d5b065, 0x1374, 0x4847, 0x8d, 0x5d, 0x31, 0x52, 0x0f, 0xee, 0x71, 0x56);")
74 cpp_quote("EXTERN_GUID(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0xa634a91c, 0x822b, 0x41b9, 0xa4, 0x94, 0x4d, 0xe4, 0x64, 0x36, 0x12, 0xb0);")
75 cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_CLASS, 0x39384300, 0xd0eb, 0x40b1, 0x87, 0xa0, 0x33, 0x18, 0x87, 0x1b, 0x5a, 0x53);")
76 cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_PRIORITY, 0x43ad19ce, 0xf33f, 0x4ba9, 0xa5, 0x80, 0xe4, 0xcd, 0x12, 0xf2, 0xd1, 0x44);")
77 cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_CLASS_AUDIO, 0x430847da, 0x0890, 0x4b0e, 0x93, 0x8c, 0x05, 0x43, 0x32, 0xc5, 0x47, 0xe1);")
78 cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_PRIORITY_AUDIO, 0x273db885, 0x2de2, 0x4db2, 0xa6, 0xa7, 0xfd, 0xb6, 0x6f, 0xb4, 0x0b, 0x61);")
79 cpp_quote("EXTERN_GUID(MF_READWRITE_D3D_OPTIONAL, 0x216479d9, 0x3071, 0x42ca, 0xbb, 0x6c, 0x4c, 0x22, 0x10, 0x2e, 0x1d, 0x18);")
81 interface IMFMediaSource;
84 object,
85 uuid(70ae66f2-c809-4e4f-8915-bdcb406b7993),
86 local
88 interface IMFSourceReader : IUnknown
90 HRESULT GetStreamSelection([in] DWORD index, [out] BOOL *selected);
91 HRESULT SetStreamSelection([in] DWORD index, [in] BOOL selected);
92 HRESULT GetNativeMediaType([in] DWORD index, [in] DWORD typeindex, [out] IMFMediaType **type);
93 HRESULT GetCurrentMediaType([in] DWORD index, [out] IMFMediaType **type);
94 HRESULT SetCurrentMediaType([in] DWORD index, [in, out] DWORD *reserved, [in] IMFMediaType *type);
95 HRESULT SetCurrentPosition([in] REFGUID format, [in] REFPROPVARIANT position);
96 HRESULT ReadSample([in] DWORD index, [in] DWORD flags, [out] DWORD *actualindex, [out] DWORD *sampleflags,
97 [out] LONGLONG *timestamp, [out] IMFSample **sample);
98 HRESULT Flush([in] DWORD index);
99 HRESULT GetServiceForStream([in] DWORD index, [in] REFGUID service, [in] REFIID riid, [out] void **object);
100 HRESULT GetPresentationAttribute([in] DWORD index, [in] REFGUID guid, [out] PROPVARIANT *attr);
104 object,
105 uuid(3137f1cd-fe5e-4805-a5d8-fb477448cb3d),
106 local
108 interface IMFSinkWriter : IUnknown
110 HRESULT AddStream([in] IMFMediaType *type, [out] DWORD *index);
111 HRESULT SetInputMediaType([in] DWORD index, [in] IMFMediaType *type, [in] IMFAttributes *parameters);
112 HRESULT BeginWriting(void);
113 HRESULT WriteSample([in] DWORD index, [in] IMFSample *sample);
114 HRESULT SendStreamTick([in] DWORD index, [in] LONGLONG timestamp);
115 HRESULT PlaceMarker([in] DWORD index, [in] void *context);
116 HRESULT NotifyEndOfSegment([in] DWORD index);
117 HRESULT Flush([in] DWORD index);
118 HRESULT Finalize(void);
119 HRESULT GetServiceForStream([in] DWORD index, [in] REFGUID service, [in] REFIID riid, [out] void **object);
120 HRESULT GetStatistics([in] DWORD index, [out] MF_SINK_WRITER_STATISTICS *stats);
124 object,
125 uuid(588d72ab-5Bc1-496a-8714-b70617141b25),
126 local
128 interface IMFSinkWriterEx : IMFSinkWriter
130 HRESULT GetTransformForStream([in] DWORD index, [in] DWORD tindex, [out] GUID *category,
131 [out] IMFTransform **transform);
135 object,
136 uuid(e7fe2e12-661c-40da-92f9-4f002ab67627),
137 local
139 interface IMFReadWriteClassFactory : IUnknown
141 HRESULT CreateInstanceFromURL([in] REFCLSID clsid, [in] LPCWSTR url, [in] IMFAttributes *attributes,
142 [in] REFIID riid, [out, iid_is(riid)] void **object );
144 HRESULT CreateInstanceFromObject([in] REFCLSID clsid, [in] IUnknown *unk, [in] IMFAttributes *attributes,
145 [in] REFIID riid, [out, iid_is(riid)] void **object );
148 cpp_quote( "HRESULT WINAPI MFCreateSourceReaderFromByteStream(IMFByteStream *stream, IMFAttributes *attributes," )
149 cpp_quote( " IMFSourceReader **reader);" )
150 cpp_quote( "HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes," )
151 cpp_quote( " IMFSourceReader **reader);" )