2 * Implementation of IAMMultiMediaStream Interface
4 * Copyright 2004 Christian Costa
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
32 #include "amstream_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(amstream);
38 IAMMultiMediaStream lpVtbl;
40 } IAMMultiMediaStreamImpl;
42 static struct IAMMultiMediaStreamVtbl AM_Vtbl;
44 HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
46 IAMMultiMediaStreamImpl* object;
48 FIXME("(%p,%p)\n", pUnkOuter, ppObj);
51 return CLASS_E_NOAGGREGATION;
53 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl));
55 object->lpVtbl.lpVtbl = &AM_Vtbl;
63 /*** IUnknown methods ***/
64 static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream* iface, REFIID riid, void** ppvObject)
66 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
68 FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
70 if (IsEqualGUID(riid, &IID_IUnknown)
71 || IsEqualGUID(riid, &IID_IAMMultiMediaStream))
73 IClassFactory_AddRef(iface);
78 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
82 static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
84 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
86 TRACE("(%p/%p)\n", iface, This);
87 return InterlockedIncrement(&This->ref);
90 static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
92 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
93 ULONG ref = InterlockedDecrement(&This->ref);
95 TRACE("(%p/%p)\n", iface, This);
98 HeapFree(GetProcessHeap(), 0, This);
103 /*** IMultiMediaStream methods ***/
104 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream* iface, char* pdwFlags, STREAM_TYPE* pStreamType)
106 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
108 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType);
113 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream* iface, REFMSPID idPurpose, IMediaStream** ppMediaStream)
115 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
117 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, idPurpose, ppMediaStream);
122 static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream* iface, long Index, IMediaStream** ppMediaStream)
124 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
126 FIXME("(%p/%p)->(%ld,%p) stub!\n", This, iface, Index, ppMediaStream);
131 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* iface, STREAM_STATE* pCurrentState)
133 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
135 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState);
140 static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE NewState)
142 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
144 FIXME("(%p/%p)->() stub!\n", This, iface);
149 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime)
151 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
153 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime);
158 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* iface, STREAM_TIME* pDuration)
160 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
162 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration);
167 static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME SeekTime)
169 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
171 FIXME("(%p/%p)->() stub!\n", This, iface);
176 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS)
178 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
180 FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
185 /*** IAMMultiMediaStream methods ***/
186 static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph)
188 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
190 FIXME("(%p/%p)->(%lx,%lx,%p) stub!\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
195 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream* iface, IGraphBuilder** ppGraphBuilder)
197 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
199 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppGraphBuilder);
204 static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface, IMediaStreamFilter** ppFilter)
206 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
208 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppFilter);
213 static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* pStreamObject, const MSPID* PurposeId,
214 DWORD dwFlags, IMediaStream** ppNewStream)
216 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
218 FIXME("(%p/%p)->(%p,%p,%lx,%p) stub!\n", This, iface, pStreamObject, PurposeId, dwFlags, ppNewStream);
223 static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR pszFileName, DWORD dwFlags)
225 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
227 FIXME("(%p/%p)->(%p,%lx) stub!\n", This, iface, pszFileName, dwFlags);
232 static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* iface, IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags)
234 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
236 FIXME("(%p/%p)->(%p,%p,%lx) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
241 static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, DWORD dwFlags)
243 IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
245 FIXME("(%p/%p)->(%lx) stub!\n", This, iface, dwFlags);
250 static IAMMultiMediaStreamVtbl AM_Vtbl =
252 IAMMultiMediaStreamImpl_QueryInterface,
253 IAMMultiMediaStreamImpl_AddRef,
254 IAMMultiMediaStreamImpl_Release,
255 IAMMultiMediaStreamImpl_GetInformation,
256 IAMMultiMediaStreamImpl_GetMediaStream,
257 IAMMultiMediaStreamImpl_EnumMediaStreams,
258 IAMMultiMediaStreamImpl_GetState,
259 IAMMultiMediaStreamImpl_SetState,
260 IAMMultiMediaStreamImpl_GetTime,
261 IAMMultiMediaStreamImpl_GetDuration,
262 IAMMultiMediaStreamImpl_Seek,
263 IAMMultiMediaStreamImpl_GetEndOfStream,
264 IAMMultiMediaStreamImpl_Initialize,
265 IAMMultiMediaStreamImpl_GetFilterGraph,
266 IAMMultiMediaStreamImpl_GetFilter,
267 IAMMultiMediaStreamImpl_AddMediaStream,
268 IAMMultiMediaStreamImpl_OpenFile,
269 IAMMultiMediaStreamImpl_OpenMoniker,
270 IAMMultiMediaStreamImpl_Render