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"
30 #include "amstream_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(amstream
);
36 IAMMultiMediaStream lpVtbl
;
38 } IAMMultiMediaStreamImpl
;
40 static struct ICOM_VTABLE(IAMMultiMediaStream
) AM_Vtbl
;
42 HRESULT
AM_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
)
44 IAMMultiMediaStreamImpl
* object
;
46 FIXME("(%p,%p)\n", pUnkOuter
, ppObj
);
48 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IAMMultiMediaStreamImpl
));
50 object
->lpVtbl
.lpVtbl
= &AM_Vtbl
;
58 /*** IUnknown methods ***/
59 static HRESULT WINAPI
IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream
* iface
, REFIID riid
, void** ppvObject
)
61 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
63 FIXME("(%p/%p)->(%s,%p)\n", iface
, This
, debugstr_guid(riid
), ppvObject
);
65 if (IsEqualGUID(riid
, &IID_IUnknown
)
66 || IsEqualGUID(riid
, &IID_IAMMultiMediaStream
))
68 IClassFactory_AddRef(iface
);
73 ERR("(%p)->(%s,%p),not found\n",This
,debugstr_guid(riid
),ppvObject
);
77 static ULONG WINAPI
IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream
* iface
)
79 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
81 FIXME("(%p/%p)\n", iface
, This
);
87 static ULONG WINAPI
IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream
* iface
)
89 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
91 FIXME("(%p/%p)\n", iface
, This
);
94 HeapFree(GetProcessHeap(), 0, This
);
99 /*** IMultiMediaStream methods ***/
100 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream
* iface
, char* pdwFlags
, STREAM_TYPE
* pStreamType
)
102 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
104 FIXME("(%p/%p)->(%p,%p) stub!\n", This
, iface
, pdwFlags
, pStreamType
);
109 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream
* iface
, REFMSPID idPurpose
, IMediaStream
** ppMediaStream
)
111 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
113 FIXME("(%p/%p)->(%p,%p) stub!\n", This
, iface
, idPurpose
, ppMediaStream
);
118 static HRESULT WINAPI
IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream
* iface
, long Index
, IMediaStream
** ppMediaStream
)
120 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
122 FIXME("(%p/%p)->(%ld,%p) stub!\n", This
, iface
, Index
, ppMediaStream
);
127 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream
* iface
, STREAM_STATE
* pCurrentState
)
129 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
131 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, pCurrentState
);
136 static HRESULT WINAPI
IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream
* iface
, STREAM_STATE NewState
)
138 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
140 FIXME("(%p/%p)->() stub!\n", This
, iface
);
145 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream
* iface
, STREAM_TIME
* pCurrentTime
)
147 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
149 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, pCurrentTime
);
154 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream
* iface
, STREAM_TIME
* pDuration
)
156 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
158 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, pDuration
);
163 static HRESULT WINAPI
IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream
* iface
, STREAM_TIME SeekTime
)
165 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
167 FIXME("(%p/%p)->() stub!\n", This
, iface
);
172 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream
* iface
, HANDLE
* phEOS
)
174 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
176 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, phEOS
);
181 /*** IAMMultiMediaStream methods ***/
182 static HRESULT WINAPI
IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream
* iface
, STREAM_TYPE StreamType
, DWORD dwFlags
, IGraphBuilder
* pFilterGraph
)
184 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
186 FIXME("(%p/%p)->(%lx,%lx,%p) stub!\n", This
, iface
, (DWORD
)StreamType
, dwFlags
, pFilterGraph
);
191 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream
* iface
, IGraphBuilder
** ppGraphBuilder
)
193 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
195 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, ppGraphBuilder
);
200 static HRESULT WINAPI
IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream
* iface
, IMediaStreamFilter
** ppFilter
)
202 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
204 FIXME("(%p/%p)->(%p) stub!\n", This
, iface
, ppFilter
);
209 static HRESULT WINAPI
IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
* iface
, IUnknown
* pStreamObject
, const MSPID
* PurposeId
,
210 DWORD dwFlags
, IMediaStream
** ppNewStream
)
212 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
214 FIXME("(%p/%p)->(%p,%p,%lx,%p) stub!\n", This
, iface
, pStreamObject
, PurposeId
, dwFlags
, ppNewStream
);
219 static HRESULT WINAPI
IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream
* iface
, LPCWSTR pszFileName
, DWORD dwFlags
)
221 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
223 FIXME("(%p/%p)->(%p,%lx) stub!\n", This
, iface
, pszFileName
, dwFlags
);
228 static HRESULT WINAPI
IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream
* iface
, IBindCtx
* pCtx
, IMoniker
* pMoniker
, DWORD dwFlags
)
230 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
232 FIXME("(%p/%p)->(%p,%p,%lx) stub!\n", This
, iface
, pCtx
, pMoniker
, dwFlags
);
237 static HRESULT WINAPI
IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream
* iface
, DWORD dwFlags
)
239 ICOM_THIS(IAMMultiMediaStreamImpl
, iface
);
241 FIXME("(%p/%p)->(%lx) stub!\n", This
, iface
, dwFlags
);
246 static ICOM_VTABLE(IAMMultiMediaStream
) AM_Vtbl
=
248 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
249 IAMMultiMediaStreamImpl_QueryInterface
,
250 IAMMultiMediaStreamImpl_AddRef
,
251 IAMMultiMediaStreamImpl_Release
,
252 IAMMultiMediaStreamImpl_GetInformation
,
253 IAMMultiMediaStreamImpl_GetMediaStream
,
254 IAMMultiMediaStreamImpl_EnumMediaStreams
,
255 IAMMultiMediaStreamImpl_GetState
,
256 IAMMultiMediaStreamImpl_SetState
,
257 IAMMultiMediaStreamImpl_GetTime
,
258 IAMMultiMediaStreamImpl_GetDuration
,
259 IAMMultiMediaStreamImpl_Seek
,
260 IAMMultiMediaStreamImpl_GetEndOfStream
,
261 IAMMultiMediaStreamImpl_Initialize
,
262 IAMMultiMediaStreamImpl_GetFilterGraph
,
263 IAMMultiMediaStreamImpl_GetFilter
,
264 IAMMultiMediaStreamImpl_AddMediaStream
,
265 IAMMultiMediaStreamImpl_OpenFile
,
266 IAMMultiMediaStreamImpl_OpenMoniker
,
267 IAMMultiMediaStreamImpl_Render