1/* 2 * Copyright 2017 Alistair Leslie-Hughes 3 * 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. 8 * 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. 13 * 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 17 */ 18 19import "mfobjects.idl"; 20 21typedef struct _MFT_INPUT_STREAM_INFO 22{ 23 LONGLONG hnsMaxLatency; 24 DWORD dwFlags; 25 DWORD cbSize; 26 DWORD cbMaxLookahead; 27 DWORD cbAlignment; 28} MFT_INPUT_STREAM_INFO; 29 30typedef struct _MFT_OUTPUT_STREAM_INFO 31{ 32 DWORD dwFlags; 33 DWORD cbSize; 34 DWORD cbAlignment; 35} MFT_OUTPUT_STREAM_INFO; 36 37typedef struct _MFT_OUTPUT_DATA_BUFFER 38{ 39 DWORD dwStreamID; 40 IMFSample *pSample; 41 DWORD dwStatus; 42 IMFCollection *pEvents; 43} MFT_OUTPUT_DATA_BUFFER, *PMFT_OUTPUT_DATA_BUFFER; 44 45typedef enum _MFT_MESSAGE_TYPE 46{ 47 MFT_MESSAGE_COMMAND_FLUSH = 0x00000000, 48 MFT_MESSAGE_COMMAND_DRAIN = 0x00000001, 49 MFT_MESSAGE_SET_D3D_MANAGER = 0x00000002, 50 MFT_MESSAGE_DROP_SAMPLES = 0x00000003, 51 MFT_MESSAGE_COMMAND_TICK = 0x00000004, 52 MFT_MESSAGE_NOTIFY_BEGIN_STREAMING = 0x10000000, 53 MFT_MESSAGE_NOTIFY_END_STREAMING = 0x10000001, 54 MFT_MESSAGE_NOTIFY_END_OF_STREAM = 0x10000002, 55 MFT_MESSAGE_NOTIFY_START_OF_STREAM = 0x10000003, 56 MFT_MESSAGE_COMMAND_MARKER = 0x20000000 57} MFT_MESSAGE_TYPE; 58 59[ 60 object, 61 uuid(bf94c121-5b05-4e6f-8000-ba598961414d) 62] 63interface IMFTransform : IUnknown 64{ 65 HRESULT GetStreamLimits([out] DWORD *input_minimum, [out] DWORD *input_maximum, [out] DWORD *output_minimum, 66 [out] DWORD *output_maximum); 67 68 HRESULT GetStreamCount([out] DWORD *inputs, [out] DWORD *outputs); 69 70 HRESULT GetStreamIDs([in] DWORD input_size, [out,size_is(input_size)] DWORD *inputs, 71 [in] DWORD output_size, [out,size_is(output_size)] DWORD *outputs); 72 73 HRESULT GetInputStreamInfo([in] DWORD id, [out] MFT_INPUT_STREAM_INFO *info); 74 75 HRESULT GetOutputStreamInfo([in] DWORD id, [out] MFT_OUTPUT_STREAM_INFO *info); 76 77 HRESULT GetAttributes([out] IMFAttributes **attributes); 78 79 HRESULT GetInputStreamAttributes([in] DWORD id, [out] IMFAttributes **attributes); 80 81 HRESULT GetOutputStreamAttributes([in] DWORD id, [out] IMFAttributes **attributes); 82 83 HRESULT DeleteInputStream([in] DWORD id); 84 85 HRESULT AddInputStreams([in] DWORD streams, [in] DWORD *ids); 86 87 HRESULT GetInputAvailableType([in] DWORD id, [in] DWORD index, [out] IMFMediaType **type); 88 89 HRESULT GetOutputAvailableType([in] DWORD id, [in] DWORD index, [out] IMFMediaType **type); 90 91 HRESULT SetInputType(DWORD id, [in] IMFMediaType *type, [in] DWORD flags); 92 93 HRESULT SetOutputType(DWORD id, [in] IMFMediaType *type, [in] DWORD flags); 94 95 HRESULT GetInputCurrentType([in] DWORD id, [out] IMFMediaType **type); 96 97 HRESULT GetOutputCurrentType([in] DWORD id, [out] IMFMediaType **type); 98 99 HRESULT GetInputStatus([in] DWORD id, [out] DWORD *flags); 100 101 HRESULT GetOutputStatus([out] DWORD *flags); 102 103 HRESULT SetOutputBounds([in] LONGLONG lower, [in] LONGLONG upper); 104 105 HRESULT ProcessEvent([in] DWORD id, [in] IMFMediaEvent *event); 106 107 HRESULT ProcessMessage([in] MFT_MESSAGE_TYPE message, [in] ULONG_PTR param); 108 109 [local] HRESULT ProcessInput([in] DWORD id, [in] IMFSample *sample, [in] DWORD flags); 110 111 [local] HRESULT ProcessOutput([in] DWORD flags, [in] DWORD count, [in,out,size_is(count)] MFT_OUTPUT_DATA_BUFFER *samples, 112 [out] DWORD *status); 113}; 114