Zebediah Figura : quartz: Use strmbase IUnknown methods for IVideoWindow.
Alexandre Julliard
julliard at winehq.org
Wed Jun 12 16:44:25 CDT 2019
Module: wine
Branch: master
Commit: 5e63f7f93a6410f1d89a24e1cd08fb5a4a8c9269
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5e63f7f93a6410f1d89a24e1cd08fb5a4a8c9269
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Jun 11 18:54:39 2019 -0500
quartz: Use strmbase IUnknown methods for IVideoWindow.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/videorenderer.c | 34 +++-------------------------------
dlls/quartz/vmr9.c | 39 +++------------------------------------
2 files changed, 6 insertions(+), 67 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 6b6806b..e4b50e2 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -708,34 +708,6 @@ static const IBaseFilterVtbl VideoRenderer_Vtbl =
BaseFilterImpl_QueryVendorInfo
};
-/*** IUnknown methods ***/
-static HRESULT WINAPI VideoWindow_QueryInterface(IVideoWindow *iface, REFIID riid, LPVOID *ppvObj)
-{
- VideoRendererImpl *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
-
- return IUnknown_QueryInterface(This->renderer.filter.outer_unk, riid, ppvObj);
-}
-
-static ULONG WINAPI VideoWindow_AddRef(IVideoWindow *iface)
-{
- VideoRendererImpl *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->()\n", This, iface);
-
- return IUnknown_AddRef(This->renderer.filter.outer_unk);
-}
-
-static ULONG WINAPI VideoWindow_Release(IVideoWindow *iface)
-{
- VideoRendererImpl *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->()\n", This, iface);
-
- return IUnknown_Release(This->renderer.filter.outer_unk);
-}
-
static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface,
LONG *FullScreenMode)
{
@@ -781,9 +753,9 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface,
static const IVideoWindowVtbl IVideoWindow_VTable =
{
- VideoWindow_QueryInterface,
- VideoWindow_AddRef,
- VideoWindow_Release,
+ BaseControlWindowImpl_QueryInterface,
+ BaseControlWindowImpl_AddRef,
+ BaseControlWindowImpl_Release,
BaseControlWindowImpl_GetTypeInfoCount,
BaseControlWindowImpl_GetTypeInfo,
BaseControlWindowImpl_GetIDsOfNames,
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 3cb7984..845b1c4 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -95,11 +95,6 @@ static inline struct quartz_vmr *impl_from_BaseWindow(BaseWindow *wnd)
return CONTAINING_RECORD(wnd, struct quartz_vmr, baseControlWindow.baseWindow);
}
-static inline struct quartz_vmr *impl_from_IVideoWindow(IVideoWindow *iface)
-{
- return CONTAINING_RECORD(iface, struct quartz_vmr, baseControlWindow.IVideoWindow_iface);
-}
-
static inline struct quartz_vmr *impl_from_BaseControlVideo(BaseControlVideo *cvid)
{
return CONTAINING_RECORD(cvid, struct quartz_vmr, baseControlVideo);
@@ -809,39 +804,11 @@ static const IBaseFilterVtbl VMR_Vtbl =
BaseFilterImpl_QueryVendorInfo
};
-/*** IUnknown methods ***/
-static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface, REFIID riid, LPVOID*ppvObj)
-{
- struct quartz_vmr *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
-
- return IUnknown_QueryInterface(This->renderer.filter.outer_unk, riid, ppvObj);
-}
-
-static ULONG WINAPI Videowindow_AddRef(IVideoWindow *iface)
-{
- struct quartz_vmr *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->()\n", This, iface);
-
- return IUnknown_AddRef(This->renderer.filter.outer_unk);
-}
-
-static ULONG WINAPI Videowindow_Release(IVideoWindow *iface)
-{
- struct quartz_vmr *This = impl_from_IVideoWindow(iface);
-
- TRACE("(%p/%p)->()\n", This, iface);
-
- return IUnknown_Release(This->renderer.filter.outer_unk);
-}
-
static const IVideoWindowVtbl IVideoWindow_VTable =
{
- Videowindow_QueryInterface,
- Videowindow_AddRef,
- Videowindow_Release,
+ BaseControlWindowImpl_QueryInterface,
+ BaseControlWindowImpl_AddRef,
+ BaseControlWindowImpl_Release,
BaseControlWindowImpl_GetTypeInfoCount,
BaseControlWindowImpl_GetTypeInfo,
BaseControlWindowImpl_GetIDsOfNames,
More information about the wine-cvs
mailing list