2 * Implementation of IMediaEvent[Ex] for FilterGraph.
6 * hidenori@a2.ctktv.ne.jp
16 #include "wine/obj_base.h"
17 #include "wine/obj_oleaut.h"
22 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(quartz
);
25 #include "quartz_private.h"
31 IMediaEventEx_fnQueryInterface(IMediaEventEx
* iface
,REFIID riid
,void** ppobj
)
33 CFilterGraph_THIS(iface
,mediaevent
);
35 TRACE("(%p)->()\n",This
);
37 return IUnknown_QueryInterface(This
->unk
.punkControl
,riid
,ppobj
);
41 IMediaEventEx_fnAddRef(IMediaEventEx
* iface
)
43 CFilterGraph_THIS(iface
,mediaevent
);
45 TRACE("(%p)->()\n",This
);
47 return IUnknown_AddRef(This
->unk
.punkControl
);
51 IMediaEventEx_fnRelease(IMediaEventEx
* iface
)
53 CFilterGraph_THIS(iface
,mediaevent
);
55 TRACE("(%p)->()\n",This
);
57 return IUnknown_Release(This
->unk
.punkControl
);
61 IMediaEventEx_fnGetTypeInfoCount(IMediaEventEx
* iface
,UINT
* pcTypeInfo
)
63 CFilterGraph_THIS(iface
,mediaevent
);
65 FIXME("(%p)->()\n",This
);
71 IMediaEventEx_fnGetTypeInfo(IMediaEventEx
* iface
,UINT iTypeInfo
, LCID lcid
, ITypeInfo
** ppobj
)
73 CFilterGraph_THIS(iface
,mediaevent
);
75 FIXME("(%p)->()\n",This
);
81 IMediaEventEx_fnGetIDsOfNames(IMediaEventEx
* iface
,REFIID riid
, LPOLESTR
* ppwszName
, UINT cNames
, LCID lcid
, DISPID
* pDispId
)
83 CFilterGraph_THIS(iface
,mediaevent
);
85 FIXME("(%p)->()\n",This
);
91 IMediaEventEx_fnInvoke(IMediaEventEx
* iface
,DISPID DispId
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarRes
, EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
93 CFilterGraph_THIS(iface
,mediaevent
);
95 FIXME("(%p)->()\n",This
);
101 static HRESULT WINAPI
102 IMediaEventEx_fnGetEventHandle(IMediaEventEx
* iface
,OAEVENT
* hEvent
)
104 CFilterGraph_THIS(iface
,mediaevent
);
106 TRACE("(%p)->()\n",This
);
108 *hEvent
= (OAEVENT
)This
->m_hMediaEvent
;
113 static HRESULT WINAPI
114 IMediaEventEx_fnGetEvent(IMediaEventEx
* iface
,long* lEventCode
,LONG_PTR
* plParam1
,LONG_PTR
* plParam2
,long lTimeOut
)
116 CFilterGraph_THIS(iface
,mediaevent
);
118 FIXME("(%p)->() stub!\n",This
);
123 static HRESULT WINAPI
124 IMediaEventEx_fnWaitForCompletion(IMediaEventEx
* iface
,long lTimeOut
,long* plEventCode
)
126 CFilterGraph_THIS(iface
,mediaevent
);
128 FIXME("(%p)->() stub!\n",This
);
133 static HRESULT WINAPI
134 IMediaEventEx_fnCancelDefaultHandling(IMediaEventEx
* iface
,long lEventCode
)
136 CFilterGraph_THIS(iface
,mediaevent
);
138 FIXME("(%p)->() stub!\n",This
);
143 static HRESULT WINAPI
144 IMediaEventEx_fnRestoreDefaultHandling(IMediaEventEx
* iface
,long lEventCode
)
146 CFilterGraph_THIS(iface
,mediaevent
);
148 FIXME("(%p)->() stub!\n",This
);
153 static HRESULT WINAPI
154 IMediaEventEx_fnFreeEventParams(IMediaEventEx
* iface
,long lEventCode
,LONG_PTR lParam1
,LONG_PTR lParam2
)
156 CFilterGraph_THIS(iface
,mediaevent
);
158 FIXME("(%p)->() stub!\n",This
);
163 static HRESULT WINAPI
164 IMediaEventEx_fnSetNotifyWindow(IMediaEventEx
* iface
,OAHWND hwnd
,long message
,LONG_PTR lParam
)
166 CFilterGraph_THIS(iface
,mediaevent
);
168 FIXME("(%p)->() stub!\n",This
);
173 static HRESULT WINAPI
174 IMediaEventEx_fnSetNotifyFlags(IMediaEventEx
* iface
,long lNotifyFlags
)
176 CFilterGraph_THIS(iface
,mediaevent
);
178 FIXME("(%p)->() stub!\n",This
);
183 static HRESULT WINAPI
184 IMediaEventEx_fnGetNotifyFlags(IMediaEventEx
* iface
,long* plNotifyFlags
)
186 CFilterGraph_THIS(iface
,mediaevent
);
188 FIXME("(%p)->() stub!\n",This
);
195 static ICOM_VTABLE(IMediaEventEx
) imediaevent
=
197 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
198 /* IUnknown fields */
199 IMediaEventEx_fnQueryInterface
,
200 IMediaEventEx_fnAddRef
,
201 IMediaEventEx_fnRelease
,
202 /* IDispatch fields */
203 IMediaEventEx_fnGetTypeInfoCount
,
204 IMediaEventEx_fnGetTypeInfo
,
205 IMediaEventEx_fnGetIDsOfNames
,
206 IMediaEventEx_fnInvoke
,
207 /* IMediaEvent fields */
208 IMediaEventEx_fnGetEventHandle
,
209 IMediaEventEx_fnGetEvent
,
210 IMediaEventEx_fnWaitForCompletion
,
211 IMediaEventEx_fnCancelDefaultHandling
,
212 IMediaEventEx_fnRestoreDefaultHandling
,
213 IMediaEventEx_fnFreeEventParams
,
214 /* IMediaEventEx fields */
215 IMediaEventEx_fnSetNotifyWindow
,
216 IMediaEventEx_fnSetNotifyFlags
,
217 IMediaEventEx_fnGetNotifyFlags
,
221 HRESULT
CFilterGraph_InitIMediaEventEx( CFilterGraph
* pfg
)
224 ICOM_VTBL(&pfg
->mediaevent
) = &imediaevent
;
226 pfg
->m_hMediaEvent
= CreateEventA( NULL
, TRUE
, FALSE
, NULL
);
227 if ( pfg
->m_hMediaEvent
== (HANDLE
)NULL
)
228 return E_OUTOFMEMORY
;
233 void CFilterGraph_UninitIMediaEventEx( CFilterGraph
* pfg
)
237 CloseHandle( pfg
->m_hMediaEvent
);