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
;
25 typedef enum MF_TOPOLOGY_TYPE
27 MF_TOPOLOGY_OUTPUT_NODE
,
28 MF_TOPOLOGY_SOURCESTREAM_NODE
,
29 MF_TOPOLOGY_TRANSFORM_NODE
,
31 MF_TOPOLOGY_MAX
= 0xffffffff
34 typedef enum _MFCLOCK_STATE
36 MFCLOCK_STATE_INVALID
,
37 MFCLOCK_STATE_RUNNING
,
38 MFCLOCK_STATE_STOPPED
,
42 typedef enum MF_OBJECT_TYPE
44 MF_OBJECT_MEDIASOURCE
,
49 typedef struct _MFCLOCK_PROPERTIES
51 unsigned __int64 qwCorrelationRate
;
54 unsigned __int64 qwClockFrequency
;
55 DWORD dwClockTolerance
;
61 uuid(2eb1e945
-18b8
-4139-9b1a
-d5d584818530
),
63 interface IMFClock
: IUnknown
65 HRESULT GetClockCharacteristics
([out] DWORD
*characteristics
);
66 HRESULT GetCorrelatedTime
([in] DWORD reserved
, [out] LONGLONG
*clock_time
, [out] MFTIME
*system_time
);
67 HRESULT GetContinuityKey
([out] DWORD
*key
);
68 HRESULT GetState
([in] DWORD reserved
, [out] MFCLOCK_STATE
*state
);
69 HRESULT GetProperties
([out] MFCLOCK_PROPERTIES
*props
);
74 uuid(83cf873a
-f6da
-4bc8
-823f
-bacfd55dc430
),
76 interface IMFTopologyNode
: IMFAttributes
78 HRESULT SetObject
([in] IUnknown
*object);
79 HRESULT GetObject
([out] IUnknown
**object);
80 HRESULT GetNodeType
([out] MF_TOPOLOGY_TYPE
*type
);
81 HRESULT GetTopoNodeID
([out] TOPOID
*id);
82 HRESULT SetTopoNodeID
([in] TOPOID
id);
83 HRESULT GetInputCount
([out] DWORD
*count
);
84 HRESULT GetOutputCount
([out] DWORD
*count
);
85 [local] HRESULT ConnectOutput
([in] DWORD output_index
, [in] IMFTopologyNode
*node
, [in] DWORD input_index
);
86 [local] HRESULT DisconnectOutput
([in] DWORD index
);
87 HRESULT GetInput
([in] DWORD input_index
, [out] IMFTopologyNode
**node
, [out] DWORD
*output_index
);
88 HRESULT GetOutput
([in] DWORD output_index
, [out] IMFTopologyNode
**node
, [out] DWORD
*input_index
);
89 [local] HRESULT SetOutputPrefType
([in] DWORD index
, [in] IMFMediaType
*type
);
90 [local] HRESULT GetOutputPrefType
([in] DWORD output_index
, [out] IMFMediaType
**type
);
91 [call_as
(GetOutputPrefType
)] HRESULT RemoteGetOutputPrefType
([in] DWORD index
, [out] DWORD
*length
,
92 [out, size_is(, *length
)] BYTE **data
);
93 [local] HRESULT SetInputPrefType
([in] DWORD index
, [in] IMFMediaType
*type
);
94 [local] HRESULT GetInputPrefType
([in] DWORD index
, [out] IMFMediaType
**type
);
95 [call_as
(GetInputPrefType
)] HRESULT RemoteGetInputPrefType
([in] DWORD index
, [out] DWORD
*length
,
96 [out, size_is(, *length
)] BYTE **data
);
97 HRESULT CloneFrom
([in] IMFTopologyNode
*node
);
102 uuid(83cf873a
-f6da
-4bc8
-823f
-bacfd55dc433
),
104 interface IMFTopology
: IMFAttributes
106 HRESULT GetTopologyID
([out] TOPOID
*id);
107 [local] HRESULT AddNode
([in] IMFTopologyNode
*node
);
108 [local] HRESULT RemoveNode
([in] IMFTopologyNode
*node
);
109 HRESULT GetNodeCount
([out] WORD
*nodes
);
110 HRESULT GetNode
([in] WORD index
, [out] IMFTopologyNode
**node
);
111 [local] HRESULT Clear
();
112 HRESULT CloneFrom
([in] IMFTopology
*topology
);
113 HRESULT GetNodeByID
([in] TOPOID
id, [out] IMFTopologyNode
**node
);
114 HRESULT GetSourceNodeCollection
([out] IMFCollection
**collection
);
115 HRESULT GetOutputNodeCollection
([out] IMFCollection
**collection
);
120 uuid(90377834-21d0
-4dee
-8214-ba2e3e6c1127
),
122 interface IMFMediaSession
: IMFMediaEventGenerator
124 HRESULT SetTopology
([in] DWORD flags
, [in] IMFTopology
*topology
);
125 HRESULT ClearTopologies
();
126 HRESULT Start
([in, unique] const GUID
*format
, [in, unique] const PROPVARIANT
*start
);
131 HRESULT GetClock
([out] IMFClock
**clock
);
132 HRESULT GetSessionCapabilities
([out] DWORD
*caps
);
133 HRESULT GetFullTopology
([in] DWORD flags
, [in] TOPOID
id, [out] IMFTopology
**topology
);
138 uuid(fbe5a32d
-a497
-4b61
-bb85
-97b1a848a6e3
)
140 interface IMFSourceResolver
: IUnknown
142 [local] HRESULT CreateObjectFromURL
([in] const WCHAR
*url
, [in] DWORD flags
, [in] IPropertyStore
*props
,
143 [out] MF_OBJECT_TYPE
*obj_type
, [out] IUnknown
**object);
144 [local] HRESULT CreateObjectFromByteStream
([in] IMFByteStream
*stream
, [in] const WCHAR
*url
, [in] DWORD flags
,
145 [in] IPropertyStore
*props
, [out] MF_OBJECT_TYPE
*obj_type
, [out] IUnknown
**object);
146 [local] HRESULT BeginCreateObjectFromURL
([in] const WCHAR
*url
, [in] DWORD flags
, [in] IPropertyStore
*props
,
147 [out] IUnknown
**cancel_cookie
, [in] IMFAsyncCallback
*callback, [in] IUnknown
*unk_state
);
148 [call_as
(BeginCreateObjectFromURL
)] HRESULT RemoteBeginCreateObjectFromURL
([in, string] const WCHAR
*url
,
149 [in] DWORD flags
, [in] IPropertyStore
*props
, [in] IMFRemoteAsyncCallback
*callback);
150 [local] HRESULT EndCreateObjectFromURL
([in] IMFAsyncResult
*result
, [out] MF_OBJECT_TYPE
*obj_type
,
151 [out] IUnknown
**object);
152 [call_as
(EndCreateObjectFromURL
)] HRESULT RemoteEndCreateObjectFromURL
([in] IUnknown
*result
,
153 [out] MF_OBJECT_TYPE
*obj_type
, [out] IUnknown
**object);
154 [local] HRESULT BeginCreateObjectFromByteStream
([in] IMFByteStream
*stream
, [in] const WCHAR
*url
,
155 [in] DWORD flags
, [in] IPropertyStore
*props
, [out] IUnknown
**cancel_cookie
,
156 [in] IMFAsyncCallback
*callback, [in] IUnknown
*unk_state
);
157 [call_as
(BeginCreateObjectFromByteStream
)] HRESULT RemoteBeginCreateObjectFromByteStream
([in] IMFByteStream
*stream
,
158 [in, unique] const WCHAR
*url
, [in] DWORD flags
, [in, unique] IPropertyStore
*props
,
159 [in] IMFRemoteAsyncCallback
*callback);
160 [local] HRESULT EndCreateObjectFromByteStream
([in] IMFAsyncResult
*result
, [out] MF_OBJECT_TYPE
*obj_type
,
161 [out] IUnknown
**object);
162 [call_as
(EndCreateObjectFromByteStream
)] HRESULT RemoteEndCreateObjectFromByteStream
([in] IUnknown
*result
,
163 [out] MF_OBJECT_TYPE
*obj_type
, [out] IUnknown
**object);
164 [local] HRESULT CanceObjectCreation
([in] IUnknown
*cancel_cookie
);
167 cpp_quote
("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
168 cpp_quote
("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);")
169 cpp_quote
("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);")