2 * Copyright 2004 Christian Costa
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 import "mmstream.idl";
23 cpp_quote("#include <ddraw.h>")
24 cpp_quote("#include <mmsystem.h>")
25 cpp_quote("#include <mmstream.h>")
26 cpp_quote("#include <ddstream.h>")
27 cpp_quote("#include <austream.h>")
30 interface IDirectDraw;
31 interface IDirectDrawSurface;
34 interface IAMMultiMediaStream;
35 interface IAMMediaStream;
36 interface IMediaStreamFilter;
37 interface IAMMediaTypeStream;
38 interface IAMMediaTypeSample;
41 AMMSF_NOGRAPHTHREAD = 0x00000001
45 AMMSF_ADDDEFAULTRENDERER = 0x00000001,
46 AMMSF_CREATEPEER = 0x00000002
50 AMMSF_RENDERTYPEMASK = 0x00000003,
51 AMMSF_RENDERTOEXISTING = 0x00000000,
52 AMMSF_RENDERALLSTREAMS = 0x00000001,
53 AMMSF_NORENDER = 0x00000002,
54 AMMSF_NOCLOCK = 0x00000004,
55 AMMSF_RUN = 0x00000008
59 typedef [v1_enum] enum {
68 uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D),
70 helpstring("IDirectShowStream Interface"),
71 pointer_default(unique)
73 interface IDirectShowStream : IDispatch
75 [propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal);
76 [propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal);
77 [propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal);
78 [propput, id(2), helpstring("propetry Video")] HRESULT Video([in] OUTPUT_STATE newVal);
79 [propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal);
80 [propput, id(3), helpstring("propetry Audio")] HRESULT Audio([in] OUTPUT_STATE newVal);
86 uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D),
87 pointer_default(unique)
89 interface IAMMultiMediaStream : IMultiMediaStream
92 [in] STREAM_TYPE StreamType,
94 [in] /*[optional]*/ IGraphBuilder *pFilterGraph);
96 HRESULT GetFilterGraph(
97 [out] IGraphBuilder **ppGraphBuilder);
100 [out] IMediaStreamFilter **ppFilter);
102 HRESULT AddMediaStream(
103 [in] /*[optional]*/ IUnknown *pStreamObject,
104 [in] /*[optional]*/ const MSPID *PurposeId,
106 [out] /*[optional]*/ IMediaStream **ppNewStream);
109 [in] LPCWSTR pszFileName,
114 [in] IMoniker *pMoniker,
124 uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D),
125 pointer_default(unique)
127 interface IAMMediaStream : IMediaStream
130 [in] /*[optional]*/ IUnknown *pSourceObject,
132 [in] REFMSPID PurposeId,
133 [in] const STREAM_TYPE StreamType);
136 [in] FILTER_STATE State);
138 HRESULT JoinAMMultiMediaStream(
139 [in] IAMMultiMediaStream *pAMMultiMediaStream);
142 [in] IMediaStreamFilter *pMediaStreamFilter);
144 HRESULT JoinFilterGraph(
145 [in] IFilterGraph *pFilterGraph);
152 uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D),
153 pointer_default(unique)
155 interface IMediaStreamFilter : IBaseFilter
157 HRESULT AddMediaStream(
158 [in] IAMMediaStream *pAMMediaStream);
160 HRESULT GetMediaStream(
161 [in] REFMSPID idPurpose,
162 [out] IMediaStream **ppMediaStream);
164 HRESULT EnumMediaStreams(
166 [out] IMediaStream **ppMediaStream);
168 HRESULT SupportSeeking(
169 [in] BOOL bRenderer);
171 HRESULT ReferenceTimeToStreamTime(
172 [in] [out] REFERENCE_TIME *pTime);
174 HRESULT GetCurrentStreamTime(
175 [out] REFERENCE_TIME *pCurrentStreamTime);
178 [in] REFERENCE_TIME WaitStreamTime);
181 [in] BOOL bCancelEOS);
183 HRESULT EndOfStream();
190 uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D),
191 pointer_default(unique)
193 interface IDirectDrawMediaSampleAllocator : IUnknown
195 HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw);
202 uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D),
203 pointer_default(unique)
205 interface IDirectDrawMediaSample : IUnknown
207 HRESULT GetSurfaceAndReleaseLock(
208 [out] IDirectDrawSurface **ppDirectDrawSurface,
211 HRESULT LockMediaSamplePointer(void);
218 uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D),
219 pointer_default(unique)
222 interface IAMMediaTypeStream : IMediaStream
225 [out] AM_MEDIA_TYPE * pMediaType,
229 [in] AM_MEDIA_TYPE * pMediaType,
232 HRESULT CreateSample(
233 [in] long lSampleSize,
234 [in] /*[optional]*/ BYTE * pbBuffer,
236 [in] /*[optional]*/ IUnknown *pUnkOuter,
237 [out] IAMMediaTypeSample ** ppAMMediaTypeSample);
239 HRESULT GetStreamAllocatorRequirements(
240 [out] ALLOCATOR_PROPERTIES *pProps);
242 HRESULT SetStreamAllocatorRequirements(
243 [in] ALLOCATOR_PROPERTIES *pProps);
250 uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D),
251 pointer_default(unique)
253 interface IAMMediaTypeSample : IStreamSample
260 [out] BYTE ** ppBuffer);
265 [out] REFERENCE_TIME * pTimeStart,
266 [out] REFERENCE_TIME * pTimeEnd);
269 [in] REFERENCE_TIME * pTimeStart,
270 [in] REFERENCE_TIME * pTimeEnd);
272 HRESULT IsSyncPoint(void);
274 HRESULT SetSyncPoint(
277 HRESULT IsPreroll(void);
282 long GetActualDataLength(void);
284 HRESULT SetActualDataLength(long Len);
286 HRESULT GetMediaType(
287 AM_MEDIA_TYPE **ppMediaType);
289 HRESULT SetMediaType(
290 AM_MEDIA_TYPE *pMediaType);
292 HRESULT IsDiscontinuity(void);
294 HRESULT SetDiscontinuity(
295 BOOL bDiscontinuity);
297 HRESULT GetMediaTime(
298 [out] LONGLONG * pTimeStart,
299 [out] LONGLONG * pTimeEnd);
301 HRESULT SetMediaTime(
302 [in] LONGLONG * pTimeStart,
303 [in] LONGLONG * pTimeEnd);
306 cpp_quote("DEFINE_GUID(CLSID_AMMultiMediaStream, 0x49c47ce5, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
307 cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
308 cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
309 cpp_quote("DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
310 cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")