1/* 2 * Copyright (C) 2002 Alexandre Julliard 3 * Copyright (C) 2004 Vincent Béron 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20import "unknwn.idl"; 21import "objidl.idl"; 22import "strmif.idl"; 23 24interface IDMOQualityControl; 25interface IDMOVideoOutputOptimizations; 26 27typedef struct _DMOMediaType 28{ 29 GUID majortype; 30 GUID subtype; 31 BOOL bFixedSizeSamples; 32 BOOL bTemporalCompression; 33 ULONG lSampleSize; 34 GUID formattype; 35 IUnknown *pUnk; 36 ULONG cbFormat; 37 BYTE *pbFormat; 38} DMO_MEDIA_TYPE; 39 40/***************************************************************************** 41 * IEnumDMO interface 42 */ 43[ 44 object, 45 uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F), 46 pointer_default(unique) 47] 48interface IEnumDMO : IUnknown 49{ 50 [local] 51 HRESULT Next( 52 [in] DWORD cItemsToFetch, 53 [out] CLSID *pCLSID, 54 [out] WCHAR **Names, 55 [out] DWORD *pcItemsFetched 56 ); 57 58 HRESULT Skip( 59 [in] DWORD cItemsToSkip 60 ); 61 62 HRESULT Reset(); 63 64 HRESULT Clone( 65 [out] IEnumDMO **ppEnum 66 ); 67} 68 69/***************************************************************************** 70 * IMediaBuffer interface 71 */ 72[ 73 object, 74 uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837), 75 local 76] 77interface IMediaBuffer : IUnknown 78{ 79 HRESULT SetLength( 80 DWORD cbLength 81 ); 82 83 HRESULT GetMaxLength( 84 [out] DWORD *pcbMaxLength 85 ); 86 87 HRESULT GetBufferAndLength( 88 [out] BYTE **ppBuffer, 89 [out] DWORD *pcbLength 90 ); 91} 92 93typedef struct _DMO_OUTPUT_DATA_BUFFER { 94 IMediaBuffer *pBuffer; 95 DWORD dwStatus; 96 REFERENCE_TIME rtTimestamp; 97 REFERENCE_TIME rtTimelength; 98} DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER; 99 100enum _DMO_INPLACE_PROCESS_FLAGS { 101 DMO_INPLACE_NORMAL = 0x00000000, 102 DMO_INPLACE_ZERO = 0x00000001 103}; 104 105enum _DMO_SET_TYPE_FLAGS { 106 DMO_SET_TYPEF_TEST_ONLY = 0x00000001, 107 DMO_SET_TYPEF_CLEAR = 0x00000002, 108}; 109 110enum _DMO_OUTPUT_DATA_BUFFERF_FLAGS { 111 DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001, 112 DMO_OUTPUT_DATA_BUFFERF_TIME = 0x00000002, 113 DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004, 114 DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x01000000, 115}; 116 117/***************************************************************************** 118 * IMediaObject interface 119 */ 120[ 121 object, 122 uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4), 123 local 124] 125interface IMediaObject : IUnknown 126{ 127 HRESULT GetStreamCount( 128 [out] DWORD *pcInputStreams, 129 [out] DWORD *pcOutputStreams 130 ); 131 132 HRESULT GetInputStreamInfo( 133 DWORD dwInputStreamIndex, 134 [out] DWORD *pdwFlags 135 ); 136 137 HRESULT GetOutputStreamInfo( 138 DWORD dwOutputStreamIndex, 139 [out] DWORD *pdwFlags 140 ); 141 142 HRESULT GetInputType( 143 DWORD dwInputStreamIndex, 144 DWORD dwTypeIndex, 145 [out] DMO_MEDIA_TYPE *pmt 146 ); 147 148 HRESULT GetOutputType( 149 DWORD dwOutputStreamIndex, 150 DWORD dwTypeIndex, 151 [out] DMO_MEDIA_TYPE *pmt 152 ); 153 154 HRESULT SetInputType( 155 DWORD dwInputStreamIndex, 156 [in] const DMO_MEDIA_TYPE *pmt, 157 DWORD dwFlags 158 ); 159 160 HRESULT SetOutputType( 161 DWORD dwOutputStreamIndex, 162 [in] const DMO_MEDIA_TYPE *pmt, 163 DWORD dwFlags 164 ); 165 166 HRESULT GetInputCurrentType( 167 DWORD dwInputStreamIndex, 168 [out] DMO_MEDIA_TYPE *pmt 169 ); 170 171 HRESULT GetOutputCurrentType( 172 DWORD dwOutputStreamIndex, 173 [out] DMO_MEDIA_TYPE *pmt 174 ); 175 176 HRESULT GetInputSizeInfo( 177 DWORD dwInputStreamIndex, 178 [out] DWORD *pcbSize, 179 [out] DWORD *pcbMaxLookahead, 180 [out] DWORD *pcbAlignment 181 ); 182 183 HRESULT GetOutputSizeInfo( 184 DWORD dwOutputStreamIndex, 185 [out] DWORD *pcbSize, 186 [out] DWORD *pcbAlignment 187 ); 188 189 HRESULT GetInputMaxLatency( 190 DWORD dwInputStreamIndex, 191 [out] REFERENCE_TIME *prtMaxLatency 192 ); 193 194 HRESULT SetInputMaxLatency( 195 DWORD dwInputStreamIndex, 196 REFERENCE_TIME rtMaxLatency 197 ); 198 199 HRESULT Flush(); 200 201 HRESULT Discontinuity(DWORD dwInputStreamIndex); 202 203 HRESULT AllocateStreamingResources(); 204 205 HRESULT FreeStreamingResources(); 206 207 HRESULT GetInputStatus( 208 DWORD dwInputStreamIndex, 209 [out] DWORD *dwFlags 210 ); 211 212 HRESULT ProcessInput( 213 DWORD dwInputStreamIndex, 214 IMediaBuffer *pBuffer, 215 DWORD dwFlags, 216 REFERENCE_TIME rtTimestamp, 217 REFERENCE_TIME rtTimelength 218 ); 219 220 HRESULT ProcessOutput( 221 DWORD dwFlags, 222 DWORD cOutputBufferCount, 223 [in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, 224 [out] DWORD *pdwStatus 225 ); 226 227 HRESULT Lock(LONG bLock); 228} 229 230/***************************************************************************** 231 * IMediaObjectInPlace interface 232 */ 233 234[ 235 object, 236 uuid(651b9ad0-0fc7-4aa9-9538-d89931010741), 237 local 238] 239interface IMediaObjectInPlace : IUnknown { 240 HRESULT Process( 241 [in] ULONG ulSize, 242 [in,out] BYTE* pData, 243 [in] REFERENCE_TIME refTimeStart, 244 [in] DWORD dwFlags 245 ); 246 247 HRESULT Clone( 248 [out] IMediaObjectInPlace **ppMediaObject 249 ); 250 251 HRESULT GetLatency( 252 [out] REFERENCE_TIME *pLatencyTime 253 ); 254} 255