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
23 cpp_quote
("#ifdef __strmif_h__")
24 cpp_quote
("typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;")
26 typedef struct _DMOMediaType
30 BOOL bFixedSizeSamples
;
31 BOOL bTemporalCompression
;
39 typedef LONGLONG REFERENCE_TIME
;
42 /*****************************************************************************
47 uuid(2C3CD98A
-2BFA
-4A53
-9C27
-5249BA64BA0F
),
48 pointer_default(unique)
50 interface IEnumDMO
: IUnknown
54 [in] DWORD cItemsToFetch
,
57 [out] DWORD
*pcItemsFetched
61 [in] DWORD cItemsToSkip
67 [out] IEnumDMO
**ppEnum
71 /*****************************************************************************
72 * IMediaBuffer interface
76 uuid(59eff8b9
-938c
-4a26
-82f2
-95cb84cdc837
),
79 interface IMediaBuffer
: IUnknown
86 [out] DWORD
*pcbMaxLength
89 HRESULT GetBufferAndLength
(
90 [out] BYTE **ppBuffer
,
91 [out] DWORD
*pcbLength
95 enum _DMO_INPUT_STATUS_FLAGS
97 DMO_INPUT_STATUSF_ACCEPT_DATA
= 0x00000001,
100 enum _DMO_INPUT_DATA_BUFFER_FLAGS
102 DMO_INPUT_DATA_BUFFERF_SYNCPOINT
= 0x00000001,
103 DMO_INPUT_DATA_BUFFERF_TIME
= 0x00000002,
104 DMO_INPUT_DATA_BUFFERF_TIMELENGTH
= 0x00000004,
107 enum _DMO_PROCESS_OUTPUT_FLAGS
109 DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER
= 0x00000001,
112 typedef struct _DMO_OUTPUT_DATA_BUFFER
{
113 IMediaBuffer
*pBuffer
;
115 REFERENCE_TIME rtTimestamp
;
116 REFERENCE_TIME rtTimelength
;
117 } DMO_OUTPUT_DATA_BUFFER
, *PDMO_OUTPUT_DATA_BUFFER
;
119 enum _DMO_INPLACE_PROCESS_FLAGS
{
120 DMO_INPLACE_NORMAL
= 0x00000000,
121 DMO_INPLACE_ZERO
= 0x00000001
124 enum _DMO_SET_TYPE_FLAGS
{
125 DMO_SET_TYPEF_TEST_ONLY
= 0x00000001,
126 DMO_SET_TYPEF_CLEAR
= 0x00000002,
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,
136 /*****************************************************************************
137 * IMediaObject interface
141 uuid(d8ad0f58
-5494-4102-97c5
-ec798e59bcf4
),
144 interface IMediaObject
: IUnknown
146 HRESULT GetStreamCount
(
147 [out] DWORD
*pcInputStreams
,
148 [out] DWORD
*pcOutputStreams
151 HRESULT GetInputStreamInfo
(
152 DWORD dwInputStreamIndex
,
153 [out] DWORD
*pdwFlags
156 HRESULT GetOutputStreamInfo
(
157 DWORD dwOutputStreamIndex
,
158 [out] DWORD
*pdwFlags
161 HRESULT GetInputType
(
162 DWORD dwInputStreamIndex
,
164 [out] DMO_MEDIA_TYPE
*pmt
167 HRESULT GetOutputType
(
168 DWORD dwOutputStreamIndex
,
170 [out] DMO_MEDIA_TYPE
*pmt
173 HRESULT SetInputType
(
174 DWORD dwInputStreamIndex
,
175 [in] const DMO_MEDIA_TYPE
*pmt
,
179 HRESULT SetOutputType
(
180 DWORD dwOutputStreamIndex
,
181 [in] const DMO_MEDIA_TYPE
*pmt
,
185 HRESULT GetInputCurrentType
(
186 DWORD dwInputStreamIndex
,
187 [out] DMO_MEDIA_TYPE
*pmt
190 HRESULT GetOutputCurrentType
(
191 DWORD dwOutputStreamIndex
,
192 [out] DMO_MEDIA_TYPE
*pmt
195 HRESULT GetInputSizeInfo
(
196 DWORD dwInputStreamIndex
,
197 [out] DWORD
*pcbSize
,
198 [out] DWORD
*pcbMaxLookahead
,
199 [out] DWORD
*pcbAlignment
202 HRESULT GetOutputSizeInfo
(
203 DWORD dwOutputStreamIndex
,
204 [out] DWORD
*pcbSize
,
205 [out] DWORD
*pcbAlignment
208 HRESULT GetInputMaxLatency
(
209 DWORD dwInputStreamIndex
,
210 [out] REFERENCE_TIME
*prtMaxLatency
213 HRESULT SetInputMaxLatency
(
214 DWORD dwInputStreamIndex
,
215 REFERENCE_TIME rtMaxLatency
220 HRESULT Discontinuity
(DWORD dwInputStreamIndex
);
222 HRESULT AllocateStreamingResources
();
224 HRESULT FreeStreamingResources
();
226 HRESULT GetInputStatus
(
227 DWORD dwInputStreamIndex
,
231 HRESULT ProcessInput
(
232 DWORD dwInputStreamIndex
,
233 IMediaBuffer
*pBuffer
,
235 REFERENCE_TIME rtTimestamp
,
236 REFERENCE_TIME rtTimelength
239 HRESULT ProcessOutput
(
241 DWORD cOutputBufferCount
,
242 [in,out] DMO_OUTPUT_DATA_BUFFER
*pOutputBuffers
,
243 [out] DWORD
*pdwStatus
246 HRESULT Lock
(LONG bLock
);
249 /*****************************************************************************
250 * IMediaObjectInPlace interface
255 uuid(651b9ad0
-0fc7
-4aa9
-9538-d89931010741
),
258 interface IMediaObjectInPlace
: IUnknown
{
261 [in,out] BYTE* pData
,
262 [in] REFERENCE_TIME refTimeStart
,
267 [out] IMediaObjectInPlace
**ppMediaObject
271 [out] REFERENCE_TIME
*pLatencyTime
275 enum _DMO_QUALITY_STATUS_FLAGS
277 DMO_QUALITY_STATUS_ENABLED
= 0x00000001,
282 uuid(65abea96
-cf36
-453f
-af8a
-705e98f16260
),
285 interface IDMOQualityControl
: IUnknown
287 HRESULT SetNow
([in] REFERENCE_TIME now
);
288 HRESULT SetStatus
([in] DWORD flags
);
289 HRESULT GetStatus
([out] DWORD
*flags
);
292 enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS
294 DMO_VOSF_NEEDS_PREVIOUS_SAMPLE
= 0x00000001,
299 uuid(be8f4f4e
-5b16
-4d29
-b350
-7f6b5d9298ac
),
302 interface IDMOVideoOutputOptimizations
: IUnknown
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
);