Commit d080774e authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

strmbase: Have PassThruImpl use BaseDispatch.

parent 7d5c4ec1
...@@ -40,6 +40,7 @@ typedef struct PassThruImpl { ...@@ -40,6 +40,7 @@ typedef struct PassThruImpl {
ISeekingPassThru ISeekingPassThru_iface; ISeekingPassThru ISeekingPassThru_iface;
IMediaSeeking IMediaSeeking_iface; IMediaSeeking IMediaSeeking_iface;
IMediaPosition IMediaPosition_iface; IMediaPosition IMediaPosition_iface;
BaseDispatch baseDispatch;
LONG ref; LONG ref;
IUnknown * outer_unk; IUnknown * outer_unk;
...@@ -121,6 +122,7 @@ static ULONG WINAPI SeekInner_Release(IUnknown * iface) { ...@@ -121,6 +122,7 @@ static ULONG WINAPI SeekInner_Release(IUnknown * iface) {
if (ref == 0) if (ref == 0)
{ {
BaseDispatch_Destroy(&This->baseDispatch);
This->time_cs.DebugInfo->Spare[0] = 0; This->time_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->time_cs); DeleteCriticalSection(&This->time_cs);
CoTaskMemFree(This); CoTaskMemFree(This);
...@@ -264,6 +266,7 @@ HRESULT WINAPI PosPassThru_Construct(IUnknown *pUnkOuter, LPVOID *ppPassThru) ...@@ -264,6 +266,7 @@ HRESULT WINAPI PosPassThru_Construct(IUnknown *pUnkOuter, LPVOID *ppPassThru)
fimpl->timevalid = 0; fimpl->timevalid = 0;
InitializeCriticalSection(&fimpl->time_cs); InitializeCriticalSection(&fimpl->time_cs);
fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs"); fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs");
BaseDispatch_Init(&fimpl->baseDispatch, &IID_IMediaPosition);
return S_OK; return S_OK;
} }
...@@ -681,36 +684,37 @@ static HRESULT WINAPI MediaPositionPassThru_GetTypeInfoCount(IMediaPosition *ifa ...@@ -681,36 +684,37 @@ static HRESULT WINAPI MediaPositionPassThru_GetTypeInfoCount(IMediaPosition *ifa
{ {
PassThruImpl *This = impl_from_IMediaPosition(iface); PassThruImpl *This = impl_from_IMediaPosition(iface);
FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo); return BaseDispatchImpl_GetTypeInfoCount(&This->baseDispatch, pctinfo);
*pctinfo = 0;
return S_OK;
} }
static HRESULT WINAPI MediaPositionPassThru_GetTypeInfo(IMediaPosition *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo) static HRESULT WINAPI MediaPositionPassThru_GetTypeInfo(IMediaPosition *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo)
{ {
PassThruImpl *This = impl_from_IMediaPosition(iface); PassThruImpl *This = impl_from_IMediaPosition(iface);
FIXME("(%p/%p)->(%d, %d, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo); return BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, &IID_NULL, iTInfo, lcid, ppTInfo);
return S_OK;
} }
static HRESULT WINAPI MediaPositionPassThru_GetIDsOfNames(IMediaPosition *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId) static HRESULT WINAPI MediaPositionPassThru_GetIDsOfNames(IMediaPosition *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId)
{ {
PassThruImpl *This = impl_from_IMediaPosition(iface); PassThruImpl *This = impl_from_IMediaPosition(iface);
FIXME("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); return BaseDispatchImpl_GetIDsOfNames(&This->baseDispatch, riid, rgszNames, cNames, lcid, rgDispId);
return S_OK;
} }
static HRESULT WINAPI MediaPositionPassThru_Invoke(IMediaPosition *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr) static HRESULT WINAPI MediaPositionPassThru_Invoke(IMediaPosition *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr)
{ {
PassThruImpl *This = impl_from_IMediaPosition(iface); PassThruImpl *This = impl_from_IMediaPosition(iface);
FIXME("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); HRESULT hr = S_OK;
ITypeInfo *pTypeInfo;
return S_OK; hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(pTypeInfo, &This->IMediaPosition_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
ITypeInfo_Release(pTypeInfo);
}
return hr;
} }
static HRESULT WINAPI MediaPositionPassThru_get_Duration(IMediaPosition *iface, REFTIME *plength) static HRESULT WINAPI MediaPositionPassThru_get_Duration(IMediaPosition *iface, REFTIME *plength)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment