1 | /*
|
---|
2 | * Copyright 2004 Christian Costa
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | import "unknwn.idl";
|
---|
29 | import "mmstream.idl";
|
---|
30 | import "strmif.idl";
|
---|
31 |
|
---|
32 | cpp_quote("#include <ddraw.h>")
|
---|
33 | cpp_quote("#include <mmsystem.h>")
|
---|
34 | cpp_quote("#include <mmstream.h>")
|
---|
35 | cpp_quote("#include <ddstream.h>")
|
---|
36 | cpp_quote("#include <austream.h>")
|
---|
37 |
|
---|
38 | cpp_quote("#if 0")
|
---|
39 | interface IDirectDraw;
|
---|
40 | interface IDirectDrawSurface;
|
---|
41 | cpp_quote("#endif")
|
---|
42 |
|
---|
43 | interface IAMMultiMediaStream;
|
---|
44 | interface IAMMediaStream;
|
---|
45 | interface IMediaStreamFilter;
|
---|
46 | interface IAMMediaTypeStream;
|
---|
47 | interface IAMMediaTypeSample;
|
---|
48 |
|
---|
49 | enum {
|
---|
50 | AMMSF_NOGRAPHTHREAD = 0x00000001
|
---|
51 | };
|
---|
52 |
|
---|
53 | enum {
|
---|
54 | AMMSF_ADDDEFAULTRENDERER = 0x00000001,
|
---|
55 | AMMSF_CREATEPEER = 0x00000002,
|
---|
56 | AMMSF_STOPIFNOSAMPLES = 0x00000004,
|
---|
57 | AMMSF_NOSTALL = 0x00000008
|
---|
58 | };
|
---|
59 |
|
---|
60 | enum {
|
---|
61 | AMMSF_RENDERTYPEMASK = 0x00000003,
|
---|
62 | AMMSF_RENDERTOEXISTING = 0x00000000,
|
---|
63 | AMMSF_RENDERALLSTREAMS = 0x00000001,
|
---|
64 | AMMSF_NORENDER = 0x00000002,
|
---|
65 | AMMSF_NOCLOCK = 0x00000004,
|
---|
66 | AMMSF_RUN = 0x00000008
|
---|
67 | };
|
---|
68 |
|
---|
69 |
|
---|
70 | typedef [v1_enum] enum {
|
---|
71 | Disabled = 0,
|
---|
72 | ReadData = 1,
|
---|
73 | RenderData = 2
|
---|
74 | } OUTPUT_STATE;
|
---|
75 |
|
---|
76 | [
|
---|
77 | object,
|
---|
78 | uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D),
|
---|
79 | dual,
|
---|
80 | helpstring("IDirectShowStream Interface"),
|
---|
81 | pointer_default(unique)
|
---|
82 | ]
|
---|
83 | interface IDirectShowStream : IDispatch
|
---|
84 | {
|
---|
85 | [propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal);
|
---|
86 | [propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal);
|
---|
87 | [propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal);
|
---|
88 | [propput, id(2), helpstring("propetry Video")] HRESULT Video([in] OUTPUT_STATE newVal);
|
---|
89 | [propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal);
|
---|
90 | [propput, id(3), helpstring("propetry Audio")] HRESULT Audio([in] OUTPUT_STATE newVal);
|
---|
91 | };
|
---|
92 |
|
---|
93 | [
|
---|
94 | object,
|
---|
95 | uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D),
|
---|
96 | pointer_default(unique)
|
---|
97 | ]
|
---|
98 | interface IAMMultiMediaStream : IMultiMediaStream
|
---|
99 | {
|
---|
100 | HRESULT Initialize(
|
---|
101 | [in] STREAM_TYPE StreamType,
|
---|
102 | [in] DWORD dwFlags,
|
---|
103 | [in] IGraphBuilder *pFilterGraph);
|
---|
104 |
|
---|
105 | HRESULT GetFilterGraph(
|
---|
106 | [out] IGraphBuilder **ppGraphBuilder);
|
---|
107 |
|
---|
108 | HRESULT GetFilter(
|
---|
109 | [out] IMediaStreamFilter **ppFilter);
|
---|
110 |
|
---|
111 | HRESULT AddMediaStream(
|
---|
112 | [in] IUnknown *pStreamObject,
|
---|
113 | [in] const MSPID *PurposeId,
|
---|
114 | [in] DWORD dwFlags,
|
---|
115 | [out] IMediaStream **ppNewStream);
|
---|
116 |
|
---|
117 | HRESULT OpenFile(
|
---|
118 | [in] LPCWSTR pszFileName,
|
---|
119 | [in] DWORD dwFlags);
|
---|
120 |
|
---|
121 | HRESULT OpenMoniker(
|
---|
122 | [in] IBindCtx *pCtx,
|
---|
123 | [in] IMoniker *pMoniker,
|
---|
124 | [in] DWORD dwFlags);
|
---|
125 |
|
---|
126 | HRESULT Render(
|
---|
127 | [in] DWORD dwFlags);
|
---|
128 | }
|
---|
129 |
|
---|
130 |
|
---|
131 | [
|
---|
132 | object,
|
---|
133 | uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D),
|
---|
134 | pointer_default(unique)
|
---|
135 | ]
|
---|
136 | interface IAMMediaStream : IMediaStream
|
---|
137 | {
|
---|
138 | HRESULT Initialize(
|
---|
139 | [in] IUnknown *pSourceObject,
|
---|
140 | [in] DWORD dwFlags,
|
---|
141 | [in] REFMSPID PurposeId,
|
---|
142 | [in] const STREAM_TYPE StreamType);
|
---|
143 |
|
---|
144 | HRESULT SetState(
|
---|
145 | [in] FILTER_STATE State);
|
---|
146 |
|
---|
147 | HRESULT JoinAMMultiMediaStream(
|
---|
148 | [in] IAMMultiMediaStream *pAMMultiMediaStream);
|
---|
149 |
|
---|
150 | HRESULT JoinFilter(
|
---|
151 | [in] IMediaStreamFilter *pMediaStreamFilter);
|
---|
152 |
|
---|
153 | HRESULT JoinFilterGraph(
|
---|
154 | [in] IFilterGraph *pFilterGraph);
|
---|
155 | }
|
---|
156 |
|
---|
157 |
|
---|
158 | [
|
---|
159 | object,
|
---|
160 | local,
|
---|
161 | uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D),
|
---|
162 | pointer_default(unique)
|
---|
163 | ]
|
---|
164 | interface IMediaStreamFilter : IBaseFilter
|
---|
165 | {
|
---|
166 | HRESULT AddMediaStream(
|
---|
167 | [in] IAMMediaStream *pAMMediaStream);
|
---|
168 |
|
---|
169 | HRESULT GetMediaStream(
|
---|
170 | [in] REFMSPID idPurpose,
|
---|
171 | [out] IMediaStream **ppMediaStream);
|
---|
172 |
|
---|
173 | HRESULT EnumMediaStreams(
|
---|
174 | [in] long Index,
|
---|
175 | [out] IMediaStream **ppMediaStream);
|
---|
176 |
|
---|
177 | HRESULT SupportSeeking(
|
---|
178 | [in] BOOL bRenderer);
|
---|
179 |
|
---|
180 | HRESULT ReferenceTimeToStreamTime(
|
---|
181 | [in] [out] REFERENCE_TIME *pTime);
|
---|
182 |
|
---|
183 | HRESULT GetCurrentStreamTime(
|
---|
184 | [out] REFERENCE_TIME *pCurrentStreamTime);
|
---|
185 |
|
---|
186 | HRESULT WaitUntil(
|
---|
187 | [in] REFERENCE_TIME WaitStreamTime);
|
---|
188 |
|
---|
189 | HRESULT Flush(
|
---|
190 | [in] BOOL bCancelEOS);
|
---|
191 |
|
---|
192 | HRESULT EndOfStream();
|
---|
193 | }
|
---|
194 |
|
---|
195 |
|
---|
196 | [
|
---|
197 | object,
|
---|
198 | local,
|
---|
199 | uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D),
|
---|
200 | pointer_default(unique)
|
---|
201 | ]
|
---|
202 | interface IDirectDrawMediaSampleAllocator : IUnknown
|
---|
203 | {
|
---|
204 | HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw);
|
---|
205 | }
|
---|
206 |
|
---|
207 |
|
---|
208 | [
|
---|
209 | object,
|
---|
210 | local,
|
---|
211 | uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D),
|
---|
212 | pointer_default(unique)
|
---|
213 | ]
|
---|
214 | interface IDirectDrawMediaSample : IUnknown
|
---|
215 | {
|
---|
216 | HRESULT GetSurfaceAndReleaseLock(
|
---|
217 | [out] IDirectDrawSurface **ppDirectDrawSurface,
|
---|
218 | [out] RECT * pRect);
|
---|
219 |
|
---|
220 | HRESULT LockMediaSamplePointer(void);
|
---|
221 | }
|
---|
222 |
|
---|
223 |
|
---|
224 | [
|
---|
225 | object,
|
---|
226 | local,
|
---|
227 | uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D),
|
---|
228 | pointer_default(unique)
|
---|
229 | ]
|
---|
230 |
|
---|
231 | interface IAMMediaTypeStream : IMediaStream
|
---|
232 | {
|
---|
233 | HRESULT GetFormat(
|
---|
234 | [out] AM_MEDIA_TYPE * pMediaType,
|
---|
235 | [in] DWORD dwFlags);
|
---|
236 |
|
---|
237 | HRESULT SetFormat(
|
---|
238 | [in] AM_MEDIA_TYPE * pMediaType,
|
---|
239 | [in] DWORD dwFlags);
|
---|
240 |
|
---|
241 | HRESULT CreateSample(
|
---|
242 | [in] long lSampleSize,
|
---|
243 | [in] BYTE * pbBuffer,
|
---|
244 | [in] DWORD dwFlags,
|
---|
245 | [in] IUnknown *pUnkOuter,
|
---|
246 | [out] IAMMediaTypeSample ** ppAMMediaTypeSample);
|
---|
247 |
|
---|
248 | HRESULT GetStreamAllocatorRequirements(
|
---|
249 | [out] ALLOCATOR_PROPERTIES *pProps);
|
---|
250 |
|
---|
251 | HRESULT SetStreamAllocatorRequirements(
|
---|
252 | [in] ALLOCATOR_PROPERTIES *pProps);
|
---|
253 | }
|
---|
254 |
|
---|
255 |
|
---|
256 | [
|
---|
257 | object,
|
---|
258 | local,
|
---|
259 | uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D),
|
---|
260 | pointer_default(unique)
|
---|
261 | ]
|
---|
262 | interface IAMMediaTypeSample : IStreamSample
|
---|
263 | {
|
---|
264 | HRESULT SetPointer(
|
---|
265 | [in] BYTE *pBuffer,
|
---|
266 | [in] long lSize);
|
---|
267 |
|
---|
268 | HRESULT GetPointer(
|
---|
269 | [out] BYTE ** ppBuffer);
|
---|
270 |
|
---|
271 | long GetSize(void);
|
---|
272 |
|
---|
273 | HRESULT GetTime(
|
---|
274 | [out] REFERENCE_TIME * pTimeStart,
|
---|
275 | [out] REFERENCE_TIME * pTimeEnd);
|
---|
276 |
|
---|
277 | HRESULT SetTime(
|
---|
278 | [in] REFERENCE_TIME * pTimeStart,
|
---|
279 | [in] REFERENCE_TIME * pTimeEnd);
|
---|
280 |
|
---|
281 | HRESULT IsSyncPoint(void);
|
---|
282 |
|
---|
283 | HRESULT SetSyncPoint(
|
---|
284 | BOOL bIsSyncPoint);
|
---|
285 |
|
---|
286 | HRESULT IsPreroll(void);
|
---|
287 |
|
---|
288 | HRESULT SetPreroll(
|
---|
289 | BOOL bIsPreroll);
|
---|
290 |
|
---|
291 | long GetActualDataLength(void);
|
---|
292 |
|
---|
293 | HRESULT SetActualDataLength(long Len);
|
---|
294 |
|
---|
295 | HRESULT GetMediaType(
|
---|
296 | AM_MEDIA_TYPE **ppMediaType);
|
---|
297 |
|
---|
298 | HRESULT SetMediaType(
|
---|
299 | AM_MEDIA_TYPE *pMediaType);
|
---|
300 |
|
---|
301 | HRESULT IsDiscontinuity(void);
|
---|
302 |
|
---|
303 | HRESULT SetDiscontinuity(
|
---|
304 | BOOL bDiscontinuity);
|
---|
305 |
|
---|
306 | HRESULT GetMediaTime(
|
---|
307 | [out] LONGLONG * pTimeStart,
|
---|
308 | [out] LONGLONG * pTimeEnd);
|
---|
309 |
|
---|
310 | HRESULT SetMediaTime(
|
---|
311 | [in] LONGLONG * pTimeStart,
|
---|
312 | [in] LONGLONG * pTimeEnd);
|
---|
313 | }
|
---|
314 |
|
---|
315 | [
|
---|
316 | uuid(49C47CE5-9BA4-11d0-8212-00C04FC32C45)
|
---|
317 | ]
|
---|
318 | coclass AMMultiMediaStream
|
---|
319 | {
|
---|
320 | [default] dispinterface IDirectShowStream;
|
---|
321 | }
|
---|
322 |
|
---|
323 | cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
---|
324 | cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
---|
325 | cpp_quote("DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
---|
326 | cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
|
---|
327 | cpp_quote("DEFINE_GUID(CLSID_MediaStreamFilter, 0x49c47ce0, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
---|