| 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 |  | 
 
 
 
 
 | 20 | import "unknwn.idl"; | 
 
 
 
 
 | 21 | import "objidl.idl"; | 
 
 
 
 
 | 22 | import "strmif.idl"; | 
 
 
 
 
 | 23 |  | 
 
 
 
 
 | 24 | typedef struct _DMOMediaType | 
 
 
 
 
 | 25 | { | 
 
 
 
 
 | 26 | GUID majortype; | 
 
 
 
 
 | 27 | GUID subtype; | 
 
 
 
 
 | 28 | BOOL bFixedSizeSamples; | 
 
 
 
 
 | 29 | BOOL bTemporalCompression; | 
 
 
 
 
 | 30 | ULONG lSampleSize; | 
 
 
 
 
 | 31 | GUID formattype; | 
 
 
 
 
 | 32 | IUnknown *pUnk; | 
 
 
 
 
 | 33 | ULONG cbFormat; | 
 
 
 
 
 | 34 | BYTE *pbFormat; | 
 
 
 
 
 | 35 | } DMO_MEDIA_TYPE; | 
 
 
 
 
 | 36 |  | 
 
 
 
 
 | 37 | /***************************************************************************** | 
 
 
 
 
 | 38 | * IEnumDMO interface | 
 
 
 
 
 | 39 | */ | 
 
 
 
 
 | 40 | [ | 
 
 
 
 
 | 41 | object, | 
 
 
 
 
 | 42 | uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F), | 
 
 
 
 
 | 43 | pointer_default(unique) | 
 
 
 
 
 | 44 | ] | 
 
 
 
 
 | 45 | interface IEnumDMO : IUnknown | 
 
 
 
 
 | 46 | { | 
 
 
 
 
 | 47 | [local] | 
 
 
 
 
 | 48 | HRESULT Next( | 
 
 
 
 
 | 49 | [in] DWORD cItemsToFetch, | 
 
 
 
 
 | 50 | [out] CLSID *pCLSID, | 
 
 
 
 
 | 51 | [out] WCHAR **Names, | 
 
 
 
 
 | 52 | [out] DWORD *pcItemsFetched | 
 
 
 
 
 | 53 | ); | 
 
 
 
 
 | 54 |  | 
 
 
 
 
 | 55 | HRESULT Skip( | 
 
 
 
 
 | 56 | [in] DWORD cItemsToSkip | 
 
 
 
 
 | 57 | ); | 
 
 
 
 
 | 58 |  | 
 
 
 
 
 | 59 | HRESULT Reset(); | 
 
 
 
 
 | 60 |  | 
 
 
 
 
 | 61 | HRESULT Clone( | 
 
 
 
 
 | 62 | [out] IEnumDMO **ppEnum | 
 
 
 
 
 | 63 | ); | 
 
 
 
 
 | 64 | } | 
 
 
 
 
 | 65 |  | 
 
 
 
 
 | 66 | /***************************************************************************** | 
 
 
 
 
 | 67 | * IMediaBuffer interface | 
 
 
 
 
 | 68 | */ | 
 
 
 
 
 | 69 | [ | 
 
 
 
 
 | 70 | object, | 
 
 
 
 
 | 71 | uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837), | 
 
 
 
 
 | 72 | local | 
 
 
 
 
 | 73 | ] | 
 
 
 
 
 | 74 | interface IMediaBuffer : IUnknown | 
 
 
 
 
 | 75 | { | 
 
 
 
 
 | 76 | HRESULT SetLength( | 
 
 
 
 
 | 77 | DWORD cbLength | 
 
 
 
 
 | 78 | ); | 
 
 
 
 
 | 79 |  | 
 
 
 
 
 | 80 | HRESULT GetMaxLength( | 
 
 
 
 
 | 81 | [out] DWORD *pcbMaxLength | 
 
 
 
 
 | 82 | ); | 
 
 
 
 
 | 83 |  | 
 
 
 
 
 | 84 | HRESULT GetBufferAndLength( | 
 
 
 
 
 | 85 | [out] BYTE **ppBuffer, | 
 
 
 
 
 | 86 | [out] DWORD *pcbLength | 
 
 
 
 
 | 87 | ); | 
 
 
 
 
 | 88 | } | 
 
 
 
 
 | 89 |  | 
 
 
 
 
 | 90 | enum _DMO_INPUT_STATUS_FLAGS | 
 
 
 
 
 | 91 | { | 
 
 
 
 
 | 92 | DMO_INPUT_STATUSF_ACCEPT_DATA = 0x00000001, | 
 
 
 
 
 | 93 | }; | 
 
 
 
 
 | 94 |  | 
 
 
 
 
 | 95 | enum _DMO_INPUT_DATA_BUFFER_FLAGS | 
 
 
 
 
 | 96 | { | 
 
 
 
 
 | 97 | DMO_INPUT_DATA_BUFFERF_SYNCPOINT    = 0x00000001, | 
 
 
 
 
 | 98 | DMO_INPUT_DATA_BUFFERF_TIME         = 0x00000002, | 
 
 
 
 
 | 99 | DMO_INPUT_DATA_BUFFERF_TIMELENGTH   = 0x00000004, | 
 
 
 
 
 | 100 | }; | 
 
 
 
 
 | 101 |  | 
 
 
 
 
 | 102 | enum _DMO_PROCESS_OUTPUT_FLAGS | 
 
 
 
 
 | 103 | { | 
 
 
 
 
 | 104 | DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001, | 
 
 
 
 
 | 105 | }; | 
 
 
 
 
 | 106 |  | 
 
 
 
 
 | 107 | typedef struct _DMO_OUTPUT_DATA_BUFFER { | 
 
 
 
 
 | 108 | IMediaBuffer *pBuffer; | 
 
 
 
 
 | 109 | DWORD dwStatus; | 
 
 
 
 
 | 110 | REFERENCE_TIME rtTimestamp; | 
 
 
 
 
 | 111 | REFERENCE_TIME rtTimelength; | 
 
 
 
 
 | 112 | } DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER; | 
 
 
 
 
 | 113 |  | 
 
 
 
 
 | 114 | enum _DMO_INPLACE_PROCESS_FLAGS { | 
 
 
 
 
 | 115 | DMO_INPLACE_NORMAL = 0x00000000, | 
 
 
 
 
 | 116 | DMO_INPLACE_ZERO   = 0x00000001 | 
 
 
 
 
 | 117 | }; | 
 
 
 
 
 | 118 |  | 
 
 
 
 
 | 119 | enum _DMO_SET_TYPE_FLAGS { | 
 
 
 
 
 | 120 | DMO_SET_TYPEF_TEST_ONLY = 0x00000001, | 
 
 
 
 
 | 121 | DMO_SET_TYPEF_CLEAR     = 0x00000002, | 
 
 
 
 
 | 122 | }; | 
 
 
 
 
 | 123 |  | 
 
 
 
 
 | 124 | enum _DMO_OUTPUT_DATA_BUFFERF_FLAGS { | 
 
 
 
 
 | 125 | DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT   = 0x00000001, | 
 
 
 
 
 | 126 | DMO_OUTPUT_DATA_BUFFERF_TIME        = 0x00000002, | 
 
 
 
 
 | 127 | DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH  = 0x00000004, | 
 
 
 
 
 | 128 | DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE  = 0x01000000, | 
 
 
 
 
 | 129 | }; | 
 
 
 
 
 | 130 |  | 
 
 
 
 
 | 131 | /***************************************************************************** | 
 
 
 
 
 | 132 | * IMediaObject interface | 
 
 
 
 
 | 133 | */ | 
 
 
 
 
 | 134 | [ | 
 
 
 
 
 | 135 | object, | 
 
 
 
 
 | 136 | uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4), | 
 
 
 
 
 | 137 | local | 
 
 
 
 
 | 138 | ] | 
 
 
 
 
 | 139 | interface IMediaObject : IUnknown | 
 
 
 
 
 | 140 | { | 
 
 
 
 
 | 141 | HRESULT GetStreamCount( | 
 
 
 
 
 | 142 | [out] DWORD *pcInputStreams, | 
 
 
 
 
 | 143 | [out] DWORD *pcOutputStreams | 
 
 
 
 
 | 144 | ); | 
 
 
 
 
 | 145 |  | 
 
 
 
 
 | 146 | HRESULT GetInputStreamInfo( | 
 
 
 
 
 | 147 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 148 | [out] DWORD *pdwFlags | 
 
 
 
 
 | 149 | ); | 
 
 
 
 
 | 150 |  | 
 
 
 
 
 | 151 | HRESULT GetOutputStreamInfo( | 
 
 
 
 
 | 152 | DWORD dwOutputStreamIndex, | 
 
 
 
 
 | 153 | [out] DWORD *pdwFlags | 
 
 
 
 
 | 154 | ); | 
 
 
 
 
 | 155 |  | 
 
 
 
 
 | 156 | HRESULT GetInputType( | 
 
 
 
 
 | 157 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 158 | DWORD dwTypeIndex, | 
 
 
 
 
 | 159 | [out] DMO_MEDIA_TYPE *pmt | 
 
 
 
 
 | 160 | ); | 
 
 
 
 
 | 161 |  | 
 
 
 
 
 | 162 | HRESULT GetOutputType( | 
 
 
 
 
 | 163 | DWORD dwOutputStreamIndex, | 
 
 
 
 
 | 164 | DWORD dwTypeIndex, | 
 
 
 
 
 | 165 | [out] DMO_MEDIA_TYPE *pmt | 
 
 
 
 
 | 166 | ); | 
 
 
 
 
 | 167 |  | 
 
 
 
 
 | 168 | HRESULT SetInputType( | 
 
 
 
 
 | 169 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 170 | [in] const DMO_MEDIA_TYPE *pmt, | 
 
 
 
 
 | 171 | DWORD dwFlags | 
 
 
 
 
 | 172 | ); | 
 
 
 
 
 | 173 |  | 
 
 
 
 
 | 174 | HRESULT SetOutputType( | 
 
 
 
 
 | 175 | DWORD dwOutputStreamIndex, | 
 
 
 
 
 | 176 | [in] const DMO_MEDIA_TYPE *pmt, | 
 
 
 
 
 | 177 | DWORD dwFlags | 
 
 
 
 
 | 178 | ); | 
 
 
 
 
 | 179 |  | 
 
 
 
 
 | 180 | HRESULT GetInputCurrentType( | 
 
 
 
 
 | 181 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 182 | [out] DMO_MEDIA_TYPE *pmt | 
 
 
 
 
 | 183 | ); | 
 
 
 
 
 | 184 |  | 
 
 
 
 
 | 185 | HRESULT GetOutputCurrentType( | 
 
 
 
 
 | 186 | DWORD dwOutputStreamIndex, | 
 
 
 
 
 | 187 | [out] DMO_MEDIA_TYPE *pmt | 
 
 
 
 
 | 188 | ); | 
 
 
 
 
 | 189 |  | 
 
 
 
 
 | 190 | HRESULT GetInputSizeInfo( | 
 
 
 
 
 | 191 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 192 | [out] DWORD *pcbSize, | 
 
 
 
 
 | 193 | [out] DWORD *pcbMaxLookahead, | 
 
 
 
 
 | 194 | [out] DWORD *pcbAlignment | 
 
 
 
 
 | 195 | ); | 
 
 
 
 
 | 196 |  | 
 
 
 
 
 | 197 | HRESULT GetOutputSizeInfo( | 
 
 
 
 
 | 198 | DWORD dwOutputStreamIndex, | 
 
 
 
 
 | 199 | [out] DWORD *pcbSize, | 
 
 
 
 
 | 200 | [out] DWORD *pcbAlignment | 
 
 
 
 
 | 201 | ); | 
 
 
 
 
 | 202 |  | 
 
 
 
 
 | 203 | HRESULT GetInputMaxLatency( | 
 
 
 
 
 | 204 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 205 | [out] REFERENCE_TIME *prtMaxLatency | 
 
 
 
 
 | 206 | ); | 
 
 
 
 
 | 207 |  | 
 
 
 
 
 | 208 | HRESULT SetInputMaxLatency( | 
 
 
 
 
 | 209 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 210 | REFERENCE_TIME rtMaxLatency | 
 
 
 
 
 | 211 | ); | 
 
 
 
 
 | 212 |  | 
 
 
 
 
 | 213 | HRESULT Flush(); | 
 
 
 
 
 | 214 |  | 
 
 
 
 
 | 215 | HRESULT Discontinuity(DWORD dwInputStreamIndex); | 
 
 
 
 
 | 216 |  | 
 
 
 
 
 | 217 | HRESULT AllocateStreamingResources(); | 
 
 
 
 
 | 218 |  | 
 
 
 
 
 | 219 | HRESULT FreeStreamingResources(); | 
 
 
 
 
 | 220 |  | 
 
 
 
 
 | 221 | HRESULT GetInputStatus( | 
 
 
 
 
 | 222 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 223 | [out] DWORD *dwFlags | 
 
 
 
 
 | 224 | ); | 
 
 
 
 
 | 225 |  | 
 
 
 
 
 | 226 | HRESULT ProcessInput( | 
 
 
 
 
 | 227 | DWORD dwInputStreamIndex, | 
 
 
 
 
 | 228 | IMediaBuffer *pBuffer, | 
 
 
 
 
 | 229 | DWORD dwFlags, | 
 
 
 
 
 | 230 | REFERENCE_TIME rtTimestamp, | 
 
 
 
 
 | 231 | REFERENCE_TIME rtTimelength | 
 
 
 
 
 | 232 | ); | 
 
 
 
 
 | 233 |  | 
 
 
 
 
 | 234 | HRESULT ProcessOutput( | 
 
 
 
 
 | 235 | DWORD dwFlags, | 
 
 
 
 
 | 236 | DWORD cOutputBufferCount, | 
 
 
 
 
 | 237 | [in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, | 
 
 
 
 
 | 238 | [out] DWORD *pdwStatus | 
 
 
 
 
 | 239 | ); | 
 
 
 
 
 | 240 |  | 
 
 
 
 
 | 241 | HRESULT Lock(LONG bLock); | 
 
 
 
 
 | 242 | } | 
 
 
 
 
 | 243 |  | 
 
 
 
 
 | 244 | /***************************************************************************** | 
 
 
 
 
 | 245 | * IMediaObjectInPlace interface | 
 
 
 
 
 | 246 | */ | 
 
 
 
 
 | 247 |  | 
 
 
 
 
 | 248 | [ | 
 
 
 
 
 | 249 | object, | 
 
 
 
 
 | 250 | uuid(651b9ad0-0fc7-4aa9-9538-d89931010741), | 
 
 
 
 
 | 251 | local | 
 
 
 
 
 | 252 | ] | 
 
 
 
 
 | 253 | interface IMediaObjectInPlace : IUnknown { | 
 
 
 
 
 | 254 | HRESULT Process( | 
 
 
 
 
 | 255 | [in] ULONG ulSize, | 
 
 
 
 
 | 256 | [in,out] BYTE* pData, | 
 
 
 
 
 | 257 | [in] REFERENCE_TIME refTimeStart, | 
 
 
 
 
 | 258 | [in] DWORD dwFlags | 
 
 
 
 
 | 259 | ); | 
 
 
 
 
 | 260 |  | 
 
 
 
 
 | 261 | HRESULT Clone( | 
 
 
 
 
 | 262 | [out] IMediaObjectInPlace **ppMediaObject | 
 
 
 
 
 | 263 | ); | 
 
 
 
 
 | 264 |  | 
 
 
 
 
 | 265 | HRESULT GetLatency( | 
 
 
 
 
 | 266 | [out] REFERENCE_TIME *pLatencyTime | 
 
 
 
 
 | 267 | ); | 
 
 
 
 
 | 268 | } | 
 
 
 
 
 | 269 |  | 
 
 
 
 
 | 270 | enum _DMO_QUALITY_STATUS_FLAGS | 
 
 
 
 
 | 271 | { | 
 
 
 
 
 | 272 | DMO_QUALITY_STATUS_ENABLED = 0x00000001, | 
 
 
 
 
 | 273 | }; | 
 
 
 
 
 | 274 |  | 
 
 
 
 
 | 275 | [ | 
 
 
 
 
 | 276 | object, | 
 
 
 
 
 | 277 | uuid(65abea96-cf36-453f-af8a-705e98f16260), | 
 
 
 
 
 | 278 | local | 
 
 
 
 
 | 279 | ] | 
 
 
 
 
 | 280 | interface IDMOQualityControl : IUnknown | 
 
 
 
 
 | 281 | { | 
 
 
 
 
 | 282 | HRESULT SetNow([in] REFERENCE_TIME now); | 
 
 
 
 
 | 283 | HRESULT SetStatus([in] DWORD flags); | 
 
 
 
 
 | 284 | HRESULT GetStatus([out] DWORD *flags); | 
 
 
 
 
 | 285 | } | 
 
 
 
 
 | 286 |  | 
 
 
 
 
 | 287 | enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS | 
 
 
 
 
 | 288 | { | 
 
 
 
 
 | 289 | DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x00000001, | 
 
 
 
 
 | 290 | }; | 
 
 
 
 
 | 291 |  | 
 
 
 
 
 | 292 | [ | 
 
 
 
 
 | 293 | object, | 
 
 
 
 
 | 294 | uuid(be8f4f4e-5b16-4d29-b350-7f6b5d9298ac), | 
 
 
 
 
 | 295 | local | 
 
 
 
 
 | 296 | ] | 
 
 
 
 
 | 297 | interface IDMOVideoOutputOptimizations : IUnknown | 
 
 
 
 
 | 298 | { | 
 
 
 
 
 | 299 | HRESULT QueryOperationModePreferences(ULONG index, DWORD *flags); | 
 
 
 
 
 | 300 | HRESULT SetOperationMode(ULONG index, DWORD flags); | 
 
 
 
 
 | 301 | HRESULT GetCurrentOperationMode(ULONG index, DWORD *flags); | 
 
 
 
 
 | 302 | HRESULT GetCurrentSampleRequirements(ULONG index, DWORD *flags); | 
 
 
 
 
 | 303 | } |