Commit d28971a2 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

quartz: COM cleanup for IAMFilterMiscFlags in VideoRenderer.

parent 67cb8da5
...@@ -55,7 +55,7 @@ typedef struct VideoRendererImpl ...@@ -55,7 +55,7 @@ typedef struct VideoRendererImpl
BaseControlVideo baseControlVideo; BaseControlVideo baseControlVideo;
const IUnknownVtbl * IInner_vtbl; const IUnknownVtbl * IInner_vtbl;
const IAMFilterMiscFlagsVtbl *IAMFilterMiscFlags_vtbl; IAMFilterMiscFlags IAMFilterMiscFlags_iface;
BOOL init; BOOL init;
HANDLE hThread; HANDLE hThread;
...@@ -656,7 +656,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -656,7 +656,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
pVideoRenderer->bUnkOuterValid = FALSE; pVideoRenderer->bUnkOuterValid = FALSE;
pVideoRenderer->bAggregatable = FALSE; pVideoRenderer->bAggregatable = FALSE;
pVideoRenderer->IInner_vtbl = &IInner_VTable; pVideoRenderer->IInner_vtbl = &IInner_VTable;
pVideoRenderer->IAMFilterMiscFlags_vtbl = &IAMFilterMiscFlags_Vtbl; pVideoRenderer->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
pVideoRenderer->init = 0; pVideoRenderer->init = 0;
ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT)); ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT));
...@@ -711,7 +711,7 @@ static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown * iface, REFIID ...@@ -711,7 +711,7 @@ static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown * iface, REFIID
else if (IsEqualIID(riid, &IID_IVideoWindow)) else if (IsEqualIID(riid, &IID_IVideoWindow))
*ppv = &This->baseControlWindow.IVideoWindow_iface; *ppv = &This->baseControlWindow.IVideoWindow_iface;
else if (IsEqualIID(riid, &IID_IAMFilterMiscFlags)) else if (IsEqualIID(riid, &IID_IAMFilterMiscFlags))
*ppv = &This->IAMFilterMiscFlags_vtbl; *ppv = &This->IAMFilterMiscFlags_iface;
else else
{ {
HRESULT hr; HRESULT hr;
...@@ -1050,26 +1050,32 @@ static const IVideoWindowVtbl IVideoWindow_VTable = ...@@ -1050,26 +1050,32 @@ static const IVideoWindowVtbl IVideoWindow_VTable =
BaseControlWindowImpl_IsCursorHidden BaseControlWindowImpl_IsCursorHidden
}; };
static VideoRendererImpl *from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface) { static VideoRendererImpl *impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
return (VideoRendererImpl*)((char*)iface - offsetof(VideoRendererImpl, IAMFilterMiscFlags_vtbl)); {
return CONTAINING_RECORD(iface, VideoRendererImpl, IAMFilterMiscFlags_iface);
} }
static HRESULT WINAPI AMFilterMiscFlags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv) { static HRESULT WINAPI AMFilterMiscFlags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid,
VideoRendererImpl *This = from_IAMFilterMiscFlags(iface); void **ppv)
{
VideoRendererImpl *This = impl_from_IAMFilterMiscFlags(iface);
return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); return IUnknown_QueryInterface((IUnknown*)This, riid, ppv);
} }
static ULONG WINAPI AMFilterMiscFlags_AddRef(IAMFilterMiscFlags *iface) { static ULONG WINAPI AMFilterMiscFlags_AddRef(IAMFilterMiscFlags *iface)
VideoRendererImpl *This = from_IAMFilterMiscFlags(iface); {
VideoRendererImpl *This = impl_from_IAMFilterMiscFlags(iface);
return IUnknown_AddRef((IUnknown*)This); return IUnknown_AddRef((IUnknown*)This);
} }
static ULONG WINAPI AMFilterMiscFlags_Release(IAMFilterMiscFlags *iface) { static ULONG WINAPI AMFilterMiscFlags_Release(IAMFilterMiscFlags *iface)
VideoRendererImpl *This = from_IAMFilterMiscFlags(iface); {
VideoRendererImpl *This = impl_from_IAMFilterMiscFlags(iface);
return IUnknown_Release((IUnknown*)This); return IUnknown_Release((IUnknown*)This);
} }
static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags(IAMFilterMiscFlags *iface) { static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags(IAMFilterMiscFlags *iface)
{
return AM_FILTER_MISC_FLAGS_IS_RENDERER; return AM_FILTER_MISC_FLAGS_IS_RENDERER;
} }
......
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