From: Zebediah Figura z.figura12@gmail.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/filtergraph.c | 49 ++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 13 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index a98b0360e20..7e3d9fac16a 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2543,29 +2543,52 @@ static ULONG WINAPI MediaPosition_Release(IMediaPosition *iface) return IUnknown_Release(graph->outer_unk); }
-/*** IDispatch methods ***/ -static HRESULT WINAPI MediaPosition_GetTypeInfoCount(IMediaPosition *iface, UINT* pctinfo) +static HRESULT WINAPI MediaPosition_GetTypeInfoCount(IMediaPosition *iface, UINT *count) { - FIXME("(%p) stub!\n", iface); - return E_NOTIMPL; + TRACE("iface %p, count %p.\n", iface, count); + *count = 1; + return S_OK; }
-static HRESULT WINAPI MediaPosition_GetTypeInfo(IMediaPosition *iface, UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo) +static HRESULT WINAPI MediaPosition_GetTypeInfo(IMediaPosition *iface, UINT index, + LCID lcid, ITypeInfo **typeinfo) { - FIXME("(%p) stub!\n", iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, lcid %#x, typeinfo %p.\n", iface, index, lcid, typeinfo); + return strmbase_get_typeinfo(IMediaPosition_tid, typeinfo); }
-static HRESULT WINAPI MediaPosition_GetIDsOfNames(IMediaPosition* iface, REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) +static HRESULT WINAPI MediaPosition_GetIDsOfNames(IMediaPosition *iface, REFIID iid, + LPOLESTR *names, UINT count, LCID lcid, DISPID *ids) { - FIXME("(%p) stub!\n", iface); - return E_NOTIMPL; + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.\n", + iface, debugstr_guid(iid), names, count, lcid, ids); + + if (SUCCEEDED(hr = strmbase_get_typeinfo(IMediaPosition_tid, &typeinfo))) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, ids); + ITypeInfo_Release(typeinfo); + } + return hr; }
-static HRESULT WINAPI MediaPosition_Invoke(IMediaPosition* iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) +static HRESULT WINAPI MediaPosition_Invoke(IMediaPosition *iface, DISPID id, REFIID iid, LCID lcid, + WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *error_arg) { - FIXME("(%p) stub!\n", iface); - return E_NOTIMPL; + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("iface %p, id %d, iid %s, lcid %#x, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.\n", + iface, id, debugstr_guid(iid), lcid, flags, params, result, excepinfo, error_arg); + + if (SUCCEEDED(hr = strmbase_get_typeinfo(IMediaPosition_tid, &typeinfo))) + { + hr = ITypeInfo_Invoke(typeinfo, iface, id, flags, params, result, excepinfo, error_arg); + ITypeInfo_Release(typeinfo); + } + return hr; }
static HRESULT ConvertFromREFTIME(IMediaSeeking *seek, REFTIME time_in, LONGLONG *time_out)