2 * Copyright 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";
21 typedef [v1_enum] enum _MFT_MESSAGE_TYPE
23 MFT_MESSAGE_COMMAND_FLUSH
= 0x00000000,
24 MFT_MESSAGE_COMMAND_DRAIN
= 0x00000001,
25 MFT_MESSAGE_SET_D3D_MANAGER
= 0x00000002,
26 MFT_MESSAGE_DROP_SAMPLES
= 0x00000003,
27 MFT_MESSAGE_COMMAND_TICK
= 0x00000004,
28 MFT_MESSAGE_NOTIFY_BEGIN_STREAMING
= 0x10000000,
29 MFT_MESSAGE_NOTIFY_END_STREAMING
= 0x10000001,
30 MFT_MESSAGE_NOTIFY_END_OF_STREAM
= 0x10000002,
31 MFT_MESSAGE_NOTIFY_START_OF_STREAM
= 0x10000003,
32 MFT_MESSAGE_NOTIFY_RELEASE_RESOURCES
= 0x10000004,
33 MFT_MESSAGE_NOTIFY_REACQUIRE_RESOURCES
= 0x10000005,
34 MFT_MESSAGE_NOTIFY_EVENT
= 0x10000006,
35 MFT_MESSAGE_COMMAND_SET_OUTPUT_STREAM_STATE
= 0x10000007,
36 MFT_MESSAGE_COMMAND_FLUSH_OUTPUT_STREAM
= 0x10000008,
37 MFT_MESSAGE_COMMAND_MARKER
= 0x20000000
40 enum _MFT_SET_TYPE_FLAGS
42 MFT_SET_TYPE_TEST_ONLY
= 0x00000001,
45 enum _MFT_INPUT_STREAM_INFO_FLAGS
47 MFT_INPUT_STREAM_WHOLE_SAMPLES
= 0x00000001,
48 MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER
= 0x00000002,
49 MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE
= 0x00000004,
50 MFT_INPUT_STREAM_HOLDS_BUFFERS
= 0x00000008,
51 MFT_INPUT_STREAM_DOES_NOT_ADDREF
= 0x00000100,
52 MFT_INPUT_STREAM_REMOVABLE
= 0x00000200,
53 MFT_INPUT_STREAM_OPTIONAL
= 0x00000400,
54 MFT_INPUT_STREAM_PROCESSES_IN_PLACE
= 0x00000800
57 enum _MFT_INPUT_STATUS_FLAGS
59 MFT_INPUT_STATUS_ACCEPT_DATA
= 0x00000001,
62 enum _MFT_INPUT_DATA_BUFFER_FLAGS
64 MFT_INPUT_DATA_BUFFER_PLACEHOLDER
= 0xffffffff,
67 enum _MFT_OUTPUT_STREAM_INFO_FLAGS
69 MFT_OUTPUT_STREAM_WHOLE_SAMPLES
= 0x00000001,
70 MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER
= 0x00000002,
71 MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE
= 0x00000004,
72 MFT_OUTPUT_STREAM_DISCARDABLE
= 0x00000008,
73 MFT_OUTPUT_STREAM_OPTIONAL
= 0x00000010,
74 MFT_OUTPUT_STREAM_PROVIDES_SAMPLES
= 0x00000100,
75 MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES
= 0x00000200,
76 MFT_OUTPUT_STREAM_LAZY_READ
= 0x00000400,
77 MFT_OUTPUT_STREAM_REMOVABLE
= 0x00000800
80 enum _MFT_OUTPUT_DATA_BUFFER_FLAGS
82 MFT_OUTPUT_DATA_BUFFER_INCOMPLETE
= 0x01000000,
83 MFT_OUTPUT_DATA_BUFFER_FORMAT_CHANGE
= 0x00000100,
84 MFT_OUTPUT_DATA_BUFFER_STREAM_END
= 0x00000200,
85 MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE
= 0x00000300
88 enum _MFT_OUTPUT_STATUS_FLAGS
90 MFT_OUTPUT_STATUS_SAMPLE_READY
= 0x00000001
93 enum _MFT_PROCESS_OUTPUT_FLAGS
95 MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER
= 0x00000001,
96 MFT_PROCESS_OUTPUT_REGENERATE_LAST_OUTPUT
= 0x00000002
99 enum _MFT_PROCESS_OUTPUT_STATUS
101 MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS
= 0x00000100
106 MFT_DRAIN_PRODUCE_TAILS
= 0x00000000,
107 MFT_DRAIN_NO_TAILS
= 0x00000001
110 typedef enum _MF3DVideoOutputType
112 MF3DVideoOutputType_BaseView
,
113 MF3DVideoOutputType_Stereo
114 } MF3DVideoOutputType
;
116 typedef struct _MFT_INPUT_STREAM_INFO
118 LONGLONG hnsMaxLatency
;
121 DWORD cbMaxLookahead
;
123 } MFT_INPUT_STREAM_INFO
;
125 typedef struct _MFT_OUTPUT_STREAM_INFO
130 } MFT_OUTPUT_STREAM_INFO
;
132 typedef struct _MFT_OUTPUT_DATA_BUFFER
137 IMFCollection
*pEvents
;
138 } MFT_OUTPUT_DATA_BUFFER
, *PMFT_OUTPUT_DATA_BUFFER
;
142 uuid(bf94c121
-5b05
-4e6f
-8000-ba598961414d
)
144 interface IMFTransform
: IUnknown
146 HRESULT GetStreamLimits
([out] DWORD
*input_minimum
, [out] DWORD
*input_maximum
, [out] DWORD
*output_minimum
,
147 [out] DWORD
*output_maximum
);
149 HRESULT GetStreamCount
([out] DWORD
*inputs
, [out] DWORD
*outputs
);
151 HRESULT GetStreamIDs
([in] DWORD input_size
, [out,size_is(input_size
)] DWORD
*inputs
,
152 [in] DWORD output_size
, [out,size_is(output_size
)] DWORD
*outputs
);
154 HRESULT GetInputStreamInfo
([in] DWORD
id, [out] MFT_INPUT_STREAM_INFO
*info
);
156 HRESULT GetOutputStreamInfo
([in] DWORD
id, [out] MFT_OUTPUT_STREAM_INFO
*info
);
158 HRESULT GetAttributes
([out] IMFAttributes
**attributes
);
160 HRESULT GetInputStreamAttributes
([in] DWORD
id, [out] IMFAttributes
**attributes
);
162 HRESULT GetOutputStreamAttributes
([in] DWORD
id, [out] IMFAttributes
**attributes
);
164 HRESULT DeleteInputStream
([in] DWORD
id);
166 HRESULT AddInputStreams
([in] DWORD streams
, [in] DWORD
*ids
);
168 HRESULT GetInputAvailableType
([in] DWORD
id, [in] DWORD index
, [out] IMFMediaType
**type
);
170 HRESULT GetOutputAvailableType
([in] DWORD
id, [in] DWORD index
, [out] IMFMediaType
**type
);
172 HRESULT SetInputType
(DWORD
id, [in] IMFMediaType
*type
, [in] DWORD flags
);
174 HRESULT SetOutputType
(DWORD
id, [in] IMFMediaType
*type
, [in] DWORD flags
);
176 HRESULT GetInputCurrentType
([in] DWORD
id, [out] IMFMediaType
**type
);
178 HRESULT GetOutputCurrentType
([in] DWORD
id, [out] IMFMediaType
**type
);
180 HRESULT GetInputStatus
([in] DWORD
id, [out] DWORD
*flags
);
182 HRESULT GetOutputStatus
([out] DWORD
*flags
);
184 HRESULT SetOutputBounds
([in] LONGLONG lower
, [in] LONGLONG upper
);
186 HRESULT ProcessEvent
([in] DWORD
id, [in] IMFMediaEvent
*event
);
188 HRESULT ProcessMessage
([in] MFT_MESSAGE_TYPE
message, [in] ULONG_PTR param
);
190 [local] HRESULT ProcessInput
([in] DWORD
id, [in] IMFSample
*sample
, [in] DWORD flags
);
192 [local] HRESULT ProcessOutput
([in] DWORD flags
, [in] DWORD count
, [in,out,size_is(count
)] MFT_OUTPUT_DATA_BUFFER
*samples
,
193 [out] DWORD
*status
);
196 cpp_quote
("HRESULT WINAPI MFCreateTransformActivate(IMFActivate **activate);")
198 cpp_quote
("EXTERN_GUID(MF_SA_D3D_AWARE, 0xeaa35c29, 0x775e, 0x488e, 0x9b, 0x61, 0xb3, 0x28, 0x3e, 0x49, 0x58, 0x3b);")
199 cpp_quote
("EXTERN_GUID(MF_SA_REQUIRED_SAMPLE_COUNT, 0x18802c61, 0x324b, 0x4952, 0xab, 0xd0, 0x17, 0x6f, 0xf5, 0xc6, 0x96, 0xff);")
200 cpp_quote
("EXTERN_GUID(MF_TRANSFORM_ASYNC, 0xf81a699a, 0x649a, 0x497d, 0x8c, 0x73, 0x29, 0xf8, 0xfe, 0xd6, 0xad, 0x7a);")
201 cpp_quote
("EXTERN_GUID(MF_TRANSFORM_ASYNC_UNLOCK, 0xe5666d6b, 0x3422, 0x4eb6, 0xa4, 0x21, 0xda, 0x7d, 0xb1, 0xf8, 0xe2, 0x07);")
202 cpp_quote
("EXTERN_GUID(MF_TRANSFORM_CATEGORY_Attribute, 0xceabba49, 0x506d, 0x4757, 0xa6, 0xff, 0x66, 0xc1, 0x84, 0x98, 0x7e, 0x4e);")
203 cpp_quote
("EXTERN_GUID(MF_TRANSFORM_FLAGS_Attribute, 0x9359bb7e, 0x6275, 0x46c4, 0xa0, 0x25, 0x1c, 0x01, 0xe4, 0x5f, 0x1a, 0x86);")
204 cpp_quote
("EXTERN_GUID(MFT_CODEC_MERIT_Attribute, 0x88a7cb15, 0x7b07, 0x4a34, 0x91, 0x28, 0xe6, 0x4c, 0x67, 0x03, 0xc4, 0xd3);")
205 cpp_quote
("EXTERN_GUID(MFT_CONNECTED_STREAM_ATTRIBUTE, 0x71eeb820, 0xa59f, 0x4de2, 0xbc, 0xec, 0x38, 0xdb, 0x1d, 0xd6, 0x11, 0xa4);")
206 cpp_quote
("EXTERN_GUID(MFT_CONNECTED_TO_HW_STREAM, 0x34e6e728, 0x06d6, 0x4491, 0xa5, 0x53, 0x47, 0x95, 0x65, 0x0d, 0xb9, 0x12);")
207 cpp_quote
("EXTERN_GUID(MFT_DECODER_EXPOSE_OUTPUT_TYPES_IN_NATIVE_ORDER, 0xef80833f, 0xf8fa, 0x44d9, 0x80, 0xd8, 0x41, 0xed, 0x62, 0x32, 0x67, 0x0c);")
208 cpp_quote
("EXTERN_GUID(MFT_DECODER_FINAL_VIDEO_RESOLUTION_HINT, 0xdc2f8496, 0x15c4, 0x407a, 0xb6, 0xf0, 0x1b, 0x66, 0xab, 0x5f, 0xbf, 0x53);")
209 cpp_quote
("EXTERN_GUID(MFT_ENCODER_SUPPORTS_CONFIG_EVENT, 0x86a355ae, 0x3a77, 0x4ec4, 0x9f, 0x31, 0x01, 0x14, 0x9a, 0x4e, 0x92, 0xde);")
210 cpp_quote
("EXTERN_GUID(MFT_ENUM_HARDWARE_URL_Attribute, 0x2fb866ac, 0xb078, 0x4942, 0xab, 0x6c, 0x00, 0x3d, 0x05, 0xcd, 0xa6, 0x74);")
211 cpp_quote
("EXTERN_GUID(MFT_ENUM_HARDWARE_VENDOR_ID_Attribute, 0x3aecb0cc, 0x035b, 0x4bcc, 0x81, 0x85, 0x2b, 0x8d, 0x55, 0x1e, 0xf3, 0xaf);")
212 cpp_quote
("EXTERN_GUID(MFT_ENUM_TRANSCODE_ONLY_ATTRIBUTE, 0x111ea8cd, 0xb62a, 0x4bdb, 0x89, 0xf6, 0x67, 0xff, 0xcd, 0xc2, 0x45, 0x8b);")
213 cpp_quote
("EXTERN_GUID(MFT_FIELDOFUSE_UNLOCK_Attribute, 0x8ec2e9fd, 0x9148, 0x410d, 0x83, 0x1e, 0x70, 0x24, 0x39, 0x46, 0x1a, 0x8e);")
214 cpp_quote
("EXTERN_GUID(MFT_FRIENDLY_NAME_Attribute, 0x314ffbae, 0x5b41, 0x4c95, 0x9c, 0x19, 0x4e, 0x7d, 0x58, 0x6f, 0xac, 0xe3);")
215 cpp_quote
("EXTERN_GUID(MFT_INPUT_TYPES_Attributes, 0x4276c9b1, 0x759d, 0x4bf3, 0x9c, 0xd0, 0x0d, 0x72, 0x3d, 0x13, 0x8f, 0x96);")
216 cpp_quote
("EXTERN_GUID(MFT_OUTPUT_TYPES_Attributes, 0x8eae8cf3, 0xa44f, 0x4306, 0xba, 0x5c, 0xbf, 0x5d, 0xda, 0x24, 0x28, 0x18);")
217 cpp_quote
("EXTERN_GUID(MFT_PREFERRED_ENCODER_PROFILE, 0x53004909, 0x1ef5, 0x46d7, 0xa1, 0x8e, 0x5a, 0x75, 0xf8, 0xb5, 0x90, 0x5f);")
218 cpp_quote
("EXTERN_GUID(MFT_PREFERRED_OUTPUTTYPE_Attribute, 0x7e700499, 0x396a, 0x49ee, 0xb1, 0xb4, 0xf6, 0x28, 0x02, 0x1e, 0x8c, 0x9d);")
219 cpp_quote
("EXTERN_GUID(MFT_PROCESS_LOCAL_Attribute, 0x543186e4, 0x4649, 0x4e65, 0xb5, 0x88, 0x4a, 0xa3, 0x52, 0xaf, 0xf3, 0x79);")
220 cpp_quote
("EXTERN_GUID(MFT_REMUX_MARK_I_PICTURE_AS_CLEAN_POINT, 0x364e8f85, 0x3f2e, 0x436c, 0xb2, 0xa2, 0x44, 0x40, 0xa0, 0x12, 0xa9, 0xe8);")
221 cpp_quote
("EXTERN_GUID(MFT_SUPPORT_3DVIDEO, 0x093f81b1, 0x4f2e, 0x4631, 0x81, 0x68, 0x79, 0x34, 0x03, 0x2a, 0x01, 0xd3);")
222 cpp_quote
("EXTERN_GUID(MFT_TRANSFORM_CLSID_Attribute, 0x6821c42b, 0x65a4, 0x4e82, 0x99, 0xbc, 0x9a, 0x88, 0x20, 0x5e, 0xcd, 0x0c);")
224 cpp_quote
("DEFINE_PROPERTYKEY(MFPKEY_CLSID, 0xc57a84c0, 0x1a80, 0x40a3, 0x97, 0xb5, 0x92, 0x72, 0xa4, 0x03, 0xc8, 0xae, 1);")
225 cpp_quote
("DEFINE_PROPERTYKEY(MFPKEY_CATEGORY, 0xc57a84c0, 0x1a80, 0x40a3, 0x97, 0xb5, 0x92, 0x72, 0xa4, 0x03, 0xc8, 0xae, 2);")
226 cpp_quote
("DEFINE_PROPERTYKEY(MFPKEY_EXATTRIBUTE_SUPPORTED, 0x456fe843, 0x3c87, 0x40c0, 0x94, 0x9d, 0x14, 0x09, 0xc9, 0x7d, 0xab, 0x2c, 1);")
227 cpp_quote
("DEFINE_PROPERTYKEY(MFPKEY_MULTICHANNEL_CHANNEL_MASK, 0x58bdaf8c, 0x3224, 0x4692, 0x86, 0xd0, 0x44, 0xd6, 0x5c, 0x5b, 0xf8, 0x2b, 1);")