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";
21 typedef unsigned __int64 TOPOID
;
22 typedef LONGLONG MFTIME
;
24 typedef enum MF_TOPOLOGY_TYPE
26 MF_TOPOLOGY_OUTPUT_NODE
,
27 MF_TOPOLOGY_SOURCESTREAM_NODE
,
28 MF_TOPOLOGY_TRANSFORM_NODE
,
30 MF_TOPOLOGY_MAX
= 0xffffffff
33 typedef enum _MFCLOCK_STATE
35 MFCLOCK_STATE_INVALID
,
36 MFCLOCK_STATE_RUNNING
,
37 MFCLOCK_STATE_STOPPED
,
41 typedef struct _MFCLOCK_PROPERTIES
43 unsigned __int64 qwCorrelationRate
;
46 unsigned __int64 qwClockFrequency
;
47 DWORD dwClockTolerance
;
53 uuid(2eb1e945
-18b8
-4139-9b1a
-d5d584818530
),
55 interface IMFClock
: IUnknown
57 HRESULT GetClockCharacteristics
([out] DWORD
*characteristics
);
58 HRESULT GetCorrelatedTime
([in] DWORD reserved
, [out] LONGLONG
*clock_time
, [out] MFTIME
*system_time
);
59 HRESULT GetContinuityKey
([out] DWORD
*key
);
60 HRESULT GetState
([in] DWORD reserved
, [out] MFCLOCK_STATE
*state
);
61 HRESULT GetProperties
([out] MFCLOCK_PROPERTIES
*props
);
66 uuid(83cf873a
-f6da
-4bc8
-823f
-bacfd55dc430
),
68 interface IMFTopologyNode
: IMFAttributes
70 HRESULT SetObject
([in] IUnknown
*object);
71 HRESULT GetObject
([out] IUnknown
**object);
72 HRESULT GetNodeType
([out] MF_TOPOLOGY_TYPE
*type
);
73 HRESULT GetTopoNodeID
([out] TOPOID
*id);
74 HRESULT SetTopoNodeID
([in] TOPOID
id);
75 HRESULT GetInputCount
([out] DWORD
*count
);
76 HRESULT GetOutputCount
([out] DWORD
*count
);
77 [local] HRESULT ConnectOutput
([in] DWORD output_index
, [in] IMFTopologyNode
*node
, [in] DWORD input_index
);
78 [local] HRESULT DisconnectOutput
([in] DWORD index
);
79 HRESULT GetInput
([in] DWORD input_index
, [out] IMFTopologyNode
**node
, [out] DWORD
*output_index
);
80 HRESULT GetOutput
([in] DWORD output_index
, [out] IMFTopologyNode
**node
, [out] DWORD
*input_index
);
81 [local] HRESULT SetOutputPrefType
([in] DWORD index
, [in] IMFMediaType
*type
);
82 [local] HRESULT GetOutputPrefType
([in] DWORD output_index
, [out] IMFMediaType
**type
);
83 [call_as
(GetOutputPrefType
)] HRESULT RemoteGetOutputPrefType
([in] DWORD index
, [out] DWORD
*length
,
84 [out, size_is(, *length
)] BYTE **data
);
85 [local] HRESULT SetInputPrefType
([in] DWORD index
, [in] IMFMediaType
*type
);
86 [local] HRESULT GetInputPrefType
([in] DWORD index
, [out] IMFMediaType
**type
);
87 [call_as
(GetInputPrefType
)] HRESULT RemoteGetInputPrefType
([in] DWORD index
, [out] DWORD
*length
,
88 [out, size_is(, *length
)] BYTE **data
);
89 HRESULT CloneFrom
([in] IMFTopologyNode
*node
);
94 uuid(83cf873a
-f6da
-4bc8
-823f
-bacfd55dc433
),
96 interface IMFTopology
: IMFAttributes
98 HRESULT GetTopologyID
([out] TOPOID
*id);
99 [local] HRESULT AddNode
([in] IMFTopologyNode
*node
);
100 [local] HRESULT RemoveNode
([in] IMFTopologyNode
*node
);
101 HRESULT GetNodeCount
([out] WORD
*nodes
);
102 HRESULT GetNode
([in] WORD index
, [out] IMFTopologyNode
**node
);
103 [local] HRESULT Clear
();
104 HRESULT CloneFrom
([in] IMFTopology
*topology
);
105 HRESULT GetNodeByID
([in] TOPOID
id, [out] IMFTopologyNode
**node
);
106 HRESULT GetSourceNodeCollection
([out] IMFCollection
**collection
);
107 HRESULT GetOutputNodeCollection
([out] IMFCollection
**collection
);
112 uuid(90377834-21d0
-4dee
-8214-ba2e3e6c1127
),
114 interface IMFMediaSession
: IMFMediaEventGenerator
116 HRESULT SetTopology
([in] DWORD flags
, [in] IMFTopology
*topology
);
117 HRESULT ClearTopologies
();
118 HRESULT Start
([in, unique] const GUID
*format
, [in, unique] const PROPVARIANT
*start
);
123 HRESULT GetClock
([out] IMFClock
**clock
);
124 HRESULT GetSessionCapabilities
([out] DWORD
*caps
);
125 HRESULT GetFullTopology
([in] DWORD flags
, [in] TOPOID
id, [out] IMFTopology
**topology
);