2 * Copyright (C) 2002 Alexandre Julliard
3 * Copyright (C) 2004 Vincent BĂ©ron
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.
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.
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
24 interface IDMOQualityControl;
25 interface IDMOVideoOutputOptimizations;
27 typedef struct _DMOMediaType
31 BOOL bFixedSizeSamples;
32 BOOL bTemporalCompression;
40 /*****************************************************************************
45 uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F),
46 pointer_default(unique)
48 interface IEnumDMO : IUnknown
52 [in] DWORD cItemsToFetch,
55 [out] DWORD *pcItemsFetched
59 [in] DWORD cItemsToSkip
65 [out] IEnumDMO **ppEnum
69 /*****************************************************************************
70 * IMediaBuffer interface
74 uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837),
77 interface IMediaBuffer : IUnknown
84 [out] DWORD *pcbMaxLength
87 HRESULT GetBufferAndLength(
88 [out] BYTE **ppBuffer,
89 [out] DWORD *pcbLength
93 typedef struct _DMO_OUTPUT_DATA_BUFFER {
94 IMediaBuffer *pBuffer;
96 REFERENCE_TIME rtTimestamp;
97 REFERENCE_TIME rtTimelength;
98 } DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER;
100 enum _DMO_INPLACE_PROCESS_FLAGS {
101 DMO_INPLACE_NORMAL = 0x00000000,
102 DMO_INPLACE_ZERO = 0x00000001
105 /*****************************************************************************
106 * IMediaObject interface
110 uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4),
113 interface IMediaObject : IUnknown
115 HRESULT GetStreamCount(
116 [out] DWORD *pcInputStreams,
117 [out] DWORD *pcOutputStreams
120 HRESULT GetInputStreamInfo(
121 DWORD dwInputStreamIndex,
122 [out] DWORD *pdwFlags
125 HRESULT GetOutputStreamInfo(
126 DWORD dwOutputStreamIndex,
127 [out] DWORD *pdwFlags
130 HRESULT GetInputType(
131 DWORD dwInputStreamIndex,
133 [out] DMO_MEDIA_TYPE *pmt
136 HRESULT GetOutputType(
137 DWORD dwOutputStreamIndex,
139 [out] DMO_MEDIA_TYPE *pmt
142 HRESULT SetInputType(
143 DWORD dwInputStreamIndex,
144 [in] const DMO_MEDIA_TYPE *pmt,
148 HRESULT SetOutputType(
149 DWORD dwOutputStreamIndex,
150 [in] const DMO_MEDIA_TYPE *pmt,
154 HRESULT GetInputCurrentType(
155 DWORD dwInputStreamIndex,
156 [out] DMO_MEDIA_TYPE *pmt
159 HRESULT GetOutputCurrentType(
160 DWORD dwOutputStreamIndex,
161 [out] DMO_MEDIA_TYPE *pmt
164 HRESULT GetInputSizeInfo(
165 DWORD dwInputStreamIndex,
166 [out] DWORD *pcbSize,
167 [out] DWORD *pcbMaxLookahead,
168 [out] DWORD *pcbAlignment
171 HRESULT GetOutputSizeInfo(
172 DWORD dwOutputStreamIndex,
173 [out] DWORD *pcbSize,
174 [out] DWORD *pcbAlignment
177 HRESULT GetInputMaxLatency(
178 DWORD dwInputStreamIndex,
179 [out] REFERENCE_TIME *prtMaxLatency
182 HRESULT SetInputMaxLatency(
183 DWORD dwInputStreamIndex,
184 REFERENCE_TIME rtMaxLatency
189 HRESULT Discontinuity(DWORD dwInputStreamIndex);
191 HRESULT AllocateStreamingResources();
193 HRESULT FreeStreamingResources();
195 HRESULT GetInputStatus(
196 DWORD dwInputStreamIndex,
200 HRESULT ProcessInput(
201 DWORD dwInputStreamIndex,
202 IMediaBuffer *pBuffer,
204 REFERENCE_TIME rtTimestamp,
205 REFERENCE_TIME rtTimelength
208 HRESULT ProcessOutput(
210 DWORD cOutputBufferCount,
211 [in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
212 [out] DWORD *pdwStatus
215 HRESULT Lock(LONG bLock);
218 /*****************************************************************************
219 * IMediaObjectInPlace interface
224 uuid(651b9ad0-0fc7-4aa9-9538-d89931010741),
227 interface IMediaObjectInPlace : IUnknown {
230 [in,out] BYTE* pData,
231 [in] REFERENCE_TIME refTimeStart,
236 [out] IMediaObjectInPlace **ppMediaObject
240 [out] REFERENCE_TIME *pLatencyTime