dxgi: Implement dxgi_output_GetGammaControlCapabilities().
[wine.git] / include / mfidl.idl
blob2373e418be8d7250e13157088ba34e20b7fc63ed
1 /*
2 * Copyright 2016 Michael Müller
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 typedef unsigned __int64 TOPOID;
23 typedef LONGLONG MFTIME;
24 typedef DWORD MFSequencerElementId;
26 typedef enum MF_TOPOLOGY_TYPE
28 MF_TOPOLOGY_OUTPUT_NODE,
29 MF_TOPOLOGY_SOURCESTREAM_NODE,
30 MF_TOPOLOGY_TRANSFORM_NODE,
31 MF_TOPOLOGY_TEE_NODE,
32 MF_TOPOLOGY_MAX = 0xffffffff
33 } MF_TOPOLOGY_TYPE;
35 typedef enum _MFCLOCK_STATE
37 MFCLOCK_STATE_INVALID,
38 MFCLOCK_STATE_RUNNING,
39 MFCLOCK_STATE_STOPPED,
40 MFCLOCK_STATE_PAUSED
41 } MFCLOCK_STATE;
43 typedef enum MF_OBJECT_TYPE
45 MF_OBJECT_MEDIASOURCE,
46 MF_OBJECT_BYTESTREAM,
47 MF_OBJECT_INVALID
48 } MF_OBJECT_TYPE;
50 typedef struct _MFCLOCK_PROPERTIES
52 unsigned __int64 qwCorrelationRate;
53 GUID guidClockId;
54 DWORD dwClockFlags;
55 unsigned __int64 qwClockFrequency;
56 DWORD dwClockTolerance;
57 DWORD dwClockJitter;
58 } MFCLOCK_PROPERTIES;
61 object,
62 uuid(2eb1e945-18b8-4139-9b1a-d5d584818530),
64 interface IMFClock : IUnknown
66 HRESULT GetClockCharacteristics([out] DWORD *characteristics);
67 HRESULT GetCorrelatedTime([in] DWORD reserved, [out] LONGLONG *clock_time, [out] MFTIME *system_time);
68 HRESULT GetContinuityKey([out] DWORD *key);
69 HRESULT GetState([in] DWORD reserved, [out] MFCLOCK_STATE *state);
70 HRESULT GetProperties([out] MFCLOCK_PROPERTIES *props);
74 object,
75 uuid(83cf873a-f6da-4bc8-823f-bacfd55dc430),
77 interface IMFTopologyNode : IMFAttributes
79 HRESULT SetObject([in] IUnknown *object);
80 HRESULT GetObject([out] IUnknown **object);
81 HRESULT GetNodeType([out] MF_TOPOLOGY_TYPE *type);
82 HRESULT GetTopoNodeID([out] TOPOID *id);
83 HRESULT SetTopoNodeID([in] TOPOID id);
84 HRESULT GetInputCount([out] DWORD *count);
85 HRESULT GetOutputCount([out] DWORD *count);
86 [local] HRESULT ConnectOutput([in] DWORD output_index, [in] IMFTopologyNode *node, [in] DWORD input_index);
87 [local] HRESULT DisconnectOutput([in] DWORD index);
88 HRESULT GetInput([in] DWORD input_index, [out] IMFTopologyNode **node, [out] DWORD *output_index);
89 HRESULT GetOutput([in] DWORD output_index, [out] IMFTopologyNode **node, [out] DWORD *input_index);
90 [local] HRESULT SetOutputPrefType([in] DWORD index, [in] IMFMediaType *type);
91 [local] HRESULT GetOutputPrefType([in] DWORD output_index, [out] IMFMediaType **type);
92 [call_as(GetOutputPrefType)] HRESULT RemoteGetOutputPrefType([in] DWORD index, [out] DWORD *length,
93 [out, size_is(, *length)] BYTE **data);
94 [local] HRESULT SetInputPrefType([in] DWORD index, [in] IMFMediaType *type);
95 [local] HRESULT GetInputPrefType([in] DWORD index, [out] IMFMediaType **type);
96 [call_as(GetInputPrefType)] HRESULT RemoteGetInputPrefType([in] DWORD index, [out] DWORD *length,
97 [out, size_is(, *length)] BYTE **data);
98 HRESULT CloneFrom([in] IMFTopologyNode *node);
102 object,
103 uuid(83cf873a-f6da-4bc8-823f-bacfd55dc433),
105 interface IMFTopology : IMFAttributes
107 HRESULT GetTopologyID([out] TOPOID *id);
108 [local] HRESULT AddNode([in] IMFTopologyNode *node);
109 [local] HRESULT RemoveNode([in] IMFTopologyNode *node);
110 HRESULT GetNodeCount([out] WORD *nodes);
111 HRESULT GetNode([in] WORD index, [out] IMFTopologyNode **node);
112 [local] HRESULT Clear();
113 HRESULT CloneFrom([in] IMFTopology *topology);
114 HRESULT GetNodeByID([in] TOPOID id, [out] IMFTopologyNode **node);
115 HRESULT GetSourceNodeCollection([out] IMFCollection **collection);
116 HRESULT GetOutputNodeCollection([out] IMFCollection **collection);
120 object,
121 uuid(90377834-21d0-4dee-8214-ba2e3e6c1127),
123 interface IMFMediaSession : IMFMediaEventGenerator
125 HRESULT SetTopology([in] DWORD flags, [in] IMFTopology *topology);
126 HRESULT ClearTopologies();
127 HRESULT Start([in, unique] const GUID *format, [in, unique] const PROPVARIANT *start);
128 HRESULT Pause();
129 HRESULT Stop();
130 HRESULT Close();
131 HRESULT Shutdown();
132 HRESULT GetClock([out] IMFClock **clock);
133 HRESULT GetSessionCapabilities([out] DWORD *caps);
134 HRESULT GetFullTopology([in] DWORD flags, [in] TOPOID id, [out] IMFTopology **topology);
138 object,
139 uuid(fbe5a32d-a497-4b61-bb85-97b1a848a6e3)
141 interface IMFSourceResolver : IUnknown
143 [local] HRESULT CreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags, [in] IPropertyStore *props,
144 [out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
145 [local] HRESULT CreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url, [in] DWORD flags,
146 [in] IPropertyStore *props, [out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
147 [local] HRESULT BeginCreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags, [in] IPropertyStore *props,
148 [out] IUnknown **cancel_cookie, [in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
149 [call_as(BeginCreateObjectFromURL)] HRESULT RemoteBeginCreateObjectFromURL([in, string] const WCHAR *url,
150 [in] DWORD flags, [in] IPropertyStore *props, [in] IMFRemoteAsyncCallback *callback);
151 [local] HRESULT EndCreateObjectFromURL([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *obj_type,
152 [out] IUnknown **object);
153 [call_as(EndCreateObjectFromURL)] HRESULT RemoteEndCreateObjectFromURL([in] IUnknown *result,
154 [out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
155 [local] HRESULT BeginCreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url,
156 [in] DWORD flags, [in] IPropertyStore *props, [out] IUnknown **cancel_cookie,
157 [in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
158 [call_as(BeginCreateObjectFromByteStream)] HRESULT RemoteBeginCreateObjectFromByteStream([in] IMFByteStream *stream,
159 [in, unique] const WCHAR *url, [in] DWORD flags, [in, unique] IPropertyStore *props,
160 [in] IMFRemoteAsyncCallback *callback);
161 [local] HRESULT EndCreateObjectFromByteStream([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *obj_type,
162 [out] IUnknown **object);
163 [call_as(EndCreateObjectFromByteStream)] HRESULT RemoteEndCreateObjectFromByteStream([in] IUnknown *result,
164 [out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
165 [local] HRESULT CanceObjectCreation([in] IUnknown *cancel_cookie);
169 object,
170 uuid(e93dcf6c-4b07-4e1e-8123-aa16ed6eadf5)
172 interface IMFMediaTypeHandler : IUnknown
174 [local]
175 HRESULT IsMediaTypeSupported([in] IMFMediaType *in_type, [out] IMFMediaType **out_type);
177 [call_as(IsMediaTypeSupported)]
178 HRESULT RemoteIsMediaTypeSupported([in, size_is(size)] BYTE *data, [in] DWORD size,
179 [out, size_is(, *match_count)] BYTE **match, [out] DWORD *match_count);
181 HRESULT GetMediaTypeCount([out] DWORD *count);
183 [local]
184 HRESULT GetMediaTypeByIndex([in] DWORD index, [out] IMFMediaType **type);
186 [call_as(GetMediaTypeByIndex)]
187 HRESULT RemoteGetMediaTypeByIndex([in] DWORD index, [out, size_is(, *count)] BYTE **data,
188 [out] DWORD *count);
190 [local]
191 HRESULT SetCurrentMediaType([in] IMFMediaType *type);
193 [call_as(SetCurrentMediaType)]
194 HRESULT RemoteSetCurrentMediaType([in, size_is(count)] BYTE *data, [in] DWORD count);
196 [local]
197 HRESULT GetCurrentMediaType([out] IMFMediaType **type);
199 [call_as(GetCurrentMediaType)]
200 HRESULT RemoteGetCurrentMediaType([out, size_is(, *count)] BYTE **data, [out] DWORD *count);
202 HRESULT GetMajorType([out] GUID *type);
206 object,
207 uuid(56c03d9c-9dbb-45f5-ab4b-d80f47c05938)
209 interface IMFStreamDescriptor : IMFAttributes
211 HRESULT GetStreamIdentifier([out] DWORD *identifier);
213 HRESULT GetMediaTypeHandler([out] IMFMediaTypeHandler **handler);
217 object,
218 uuid(f6696e82-74f7-4f3d-a178-8a5e09c3659f)
220 interface IMFClockStateSink : IUnknown
222 HRESULT OnClockStart(
223 [in] MFTIME hnsSystemTime,
224 [in] LONGLONG llClockStartOffset
226 HRESULT OnClockStop(
227 [in] MFTIME hnssSystemTime
229 HRESULT OnClockPause(
230 [in] MFTIME hnsSystemTime
232 HRESULT OnClockRestart(
233 [in] MFTIME hnsSystemTime
235 HRESULT OnClockSetRate(
236 [in] MFTIME hnsSystemTime,
237 [in] float flRate
242 object,
243 uuid(fa993888-4383-415a-a930-dd472a8cf6f7)
245 interface IMFGetService : IUnknown
247 HRESULT GetService(
248 [in] REFGUID guidService,
249 [in] REFIID riid,
250 [out, iid_is(riid)] LPVOID *ppvObject
255 object,
256 uuid(03cb2711-24d7-4db6-a17f-f3a7a479a536),
258 interface IMFPresentationDescriptor : IMFAttributes
260 HRESULT GetStreamDescriptorCount(
261 [out] DWORD *count );
263 HRESULT GetStreamDescriptorByIndex(
264 [in] DWORD index,
265 [out] BOOL *selected,
266 [out] IMFStreamDescriptor **descriptor );
268 HRESULT SelectStream(
269 [in] DWORD index );
271 HRESULT DeselectStream(
272 [in] DWORD index );
274 HRESULT Clone(
275 [out] IMFPresentationDescriptor **descriptor );
279 object,
280 uuid(197cd219-19cb-4de1-a64c-acf2edcbe59e),
281 local
283 interface IMFSequencerSource : IUnknown
285 HRESULT AppendTopology(
286 [in] IMFTopology *topology,
287 [in] DWORD flags,
288 [out] MFSequencerElementId *element );
290 HRESULT DeleteTopology(
291 [in] MFSequencerElementId element);
293 HRESULT GetPresentationContext(
294 [in] IMFPresentationDescriptor *pd,
295 [out, optional] MFSequencerElementId *id,
296 [out, optional] IMFTopology **topology );
298 HRESULT UpdateTopology(
299 [in] MFSequencerElementId od,
300 [in] IMFTopology *topology);
302 HRESULT UpdateTopologyFlags(
303 [in] MFSequencerElementId id,
304 [in] DWORD flags );
308 cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
309 cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream);" )
310 cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);")
311 cpp_quote("HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD cMediaTypes,")
312 cpp_quote(" IMFMediaType **types, IMFStreamDescriptor **descriptor);")
313 cpp_quote("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);")
314 cpp_quote("HRESULT WINAPI MFGetSupportedMimeTypes(PROPVARIANT *array);")
315 cpp_quote("HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID iid, void **obj);")
318 object,
319 uuid(279a808d-aec7-40c8-9c6b-a6b492c78a66),
321 interface IMFMediaSource : IMFMediaEventGenerator
323 HRESULT GetCharacteristics(
324 [out] DWORD *characteristics );
326 [local]
327 HRESULT CreatePresentationDescriptor(
328 [out] IMFPresentationDescriptor **descriptor );
329 [call_as(CreatePresentationDescriptor)]
330 HRESULT RemoteCreatePresentationDescriptor(
331 [out] DWORD *count,
332 [out, size_is(,*count)] BYTE **data,
333 [out] IMFPresentationDescriptor **descriptor );
335 HRESULT Start(
336 [in] IMFPresentationDescriptor *descriptor,
337 [in, unique] const GUID *time_format,
338 [in, unique] const PROPVARIANT *start_position );
340 HRESULT Stop();
341 HRESULT Pause();
342 HRESULT Shutdown();
345 cpp_quote("#define MF_RESOLUTION_MEDIASOURCE 0x00000001")
346 cpp_quote("#define MF_RESOLUTION_BYTESTREAM 0x00000002")
347 cpp_quote("#define MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE 0x00000010")
348 cpp_quote("#define MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL 0x00000020")
349 cpp_quote("#define MF_RESOLUTION_READ 0x00010000")
350 cpp_quote("#define MF_RESOLUTION_WRITE 0x00020000")
351 cpp_quote("#define MF_RESOLUTION_DISABLE_LOCAL_PLUGINS 0x00000040")