From: Zebediah Figura z.figura12@gmail.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/quartz_private.h | 10 +++++----- dlls/quartz/videorenderer.c | 6 +++--- dlls/quartz/vmr9.c | 5 +++-- dlls/quartz/window.c | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index cf696f7936a..dafdc82d06f 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -93,21 +93,21 @@ typedef struct tagBaseWindow LONG Width; LONG Height;
- const struct BaseWindowFuncTable* pFuncsTable; + const struct video_window_ops *pFuncsTable; } BaseWindow;
typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This); typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
-typedef struct BaseWindowFuncTable +struct video_window_ops { /* Required */ BaseWindow_GetDefaultRect pfnGetDefaultRect; /* Optional, WinProc Related */ BaseWindow_OnSize pfnOnSize; -} BaseWindowFuncTable; +};
-HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const struct video_window_ops *pFuncsTable) DECLSPEC_HIDDEN; HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) DECLSPEC_HIDDEN; @@ -126,7 +126,7 @@ struct video_window };
HRESULT video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl, - struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table) DECLSPEC_HIDDEN; + struct strmbase_filter *filter, struct strmbase_pin *pin, const struct video_window_ops *ops) DECLSPEC_HIDDEN; void video_window_unregister_class(void) DECLSPEC_HIDDEN; HRESULT WINAPI BaseControlWindow_Destroy(struct video_window *window) DECLSPEC_HIDDEN;
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index ef27a8a87d1..24d734892c7 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -344,7 +344,8 @@ static const struct strmbase_renderer_ops renderer_ops = .renderer_pin_query_interface = video_renderer_pin_query_interface, };
-static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { +static const struct video_window_ops window_ops = +{ VideoRenderer_GetDefaultRect, VideoRenderer_OnSize }; @@ -710,8 +711,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable, - &object->renderer.filter, &object->renderer.sink.pin, - &renderer_BaseWindowFuncTable); + &object->renderer.filter, &object->renderer.sink.pin, &window_ops); if (FAILED(hr)) goto fail;
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 3db6a82f6a2..3778a8cee0d 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -689,7 +689,8 @@ static BOOL WINAPI VMR9_OnSize(BaseWindow *This, LONG Width, LONG Height) return TRUE; }
-static const BaseWindowFuncTable renderer_BaseWindowFuncTable = { +static const struct video_window_ops window_ops = +{ VMR9_GetDefaultRect, VMR9_OnSize, }; @@ -2319,7 +2320,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable, - &object->renderer.filter, &object->renderer.sink.pin, &renderer_BaseWindowFuncTable); + &object->renderer.filter, &object->renderer.sink.pin, &window_ops); if (FAILED(hr)) goto fail;
diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 1144d2e3404..7aaf2ea2f8f 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -84,7 +84,7 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM return DefWindowProcW(hwnd, message, wparam, lparam); }
-HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable) +HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const struct video_window_ops *pFuncsTable) { if (!pFuncsTable) return E_INVALIDARG; @@ -153,7 +153,7 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
HRESULT video_window_init(struct video_window *pControlWindow, const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, - struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) + struct strmbase_pin *pPin, const struct video_window_ops *pFuncsTable) { HRESULT hr;