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