[PATCH 5/6] strmbase: Move video.c to quartz.
Zebediah Figura
z.figura12 at gmail.com
Wed Mar 11 21:10:12 CDT 2020
The only filters that expose IBasicVideo live in quartz.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/quartz/Makefile.in | 1 +
dlls/quartz/quartz_private.h | 39 ++++++++++++++++++++++++++++
dlls/{strmbase => quartz}/video.c | 8 +++---
dlls/quartz/videorenderer.c | 2 +-
dlls/quartz/vmr9.c | 2 +-
dlls/strmbase/Makefile.in | 3 +--
include/wine/strmbase.h | 43 -------------------------------
7 files changed, 47 insertions(+), 51 deletions(-)
rename dlls/{strmbase => quartz}/video.c (98%)
diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in
index 4ba8edf5fe8..858b9578792 100644
--- a/dlls/quartz/Makefile.in
+++ b/dlls/quartz/Makefile.in
@@ -17,6 +17,7 @@ C_SRCS = \
memallocator.c \
regsvr.c \
systemclock.c \
+ video.c \
videorenderer.c \
vmr9.c \
window.c
diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h
index cbf5da4c096..20dcd5f16a5 100644
--- a/dlls/quartz/quartz_private.h
+++ b/dlls/quartz/quartz_private.h
@@ -174,4 +174,43 @@ HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LON
HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor) DECLSPEC_HIDDEN;
HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden) DECLSPEC_HIDDEN;
+typedef struct tagBaseControlVideo
+{
+ IBasicVideo IBasicVideo_iface;
+
+ struct strmbase_filter *pFilter;
+ struct strmbase_pin *pPin;
+
+ const struct BaseControlVideoFuncTable *pFuncsTable;
+} BaseControlVideo;
+
+typedef HRESULT (WINAPI *BaseControlVideo_GetSourceRect)(BaseControlVideo* This, RECT *pSourceRect) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_GetStaticImage)(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_GetTargetRect)(BaseControlVideo* This, RECT *pTargetRect) DECLSPEC_HIDDEN;
+typedef VIDEOINFOHEADER* (WINAPI *BaseControlVideo_GetVideoFormat)(BaseControlVideo* This) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultSourceRect)(BaseControlVideo* This) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultTargetRect)(BaseControlVideo* This) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultSourceRect)(BaseControlVideo* This) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultTargetRect)(BaseControlVideo* This) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_SetSourceRect)(BaseControlVideo* This, RECT *pSourceRect) DECLSPEC_HIDDEN;
+typedef HRESULT (WINAPI *BaseControlVideo_SetTargetRect)(BaseControlVideo* This, RECT *pTargetRect) DECLSPEC_HIDDEN;
+
+typedef struct BaseControlVideoFuncTable
+{
+ BaseControlVideo_GetSourceRect pfnGetSourceRect;
+ BaseControlVideo_GetStaticImage pfnGetStaticImage;
+ BaseControlVideo_GetTargetRect pfnGetTargetRect;
+ BaseControlVideo_GetVideoFormat pfnGetVideoFormat;
+ BaseControlVideo_IsDefaultSourceRect pfnIsDefaultSourceRect;
+ BaseControlVideo_IsDefaultTargetRect pfnIsDefaultTargetRect;
+ BaseControlVideo_SetDefaultSourceRect pfnSetDefaultSourceRect;
+ BaseControlVideo_SetDefaultTargetRect pfnSetDefaultTargetRect;
+ BaseControlVideo_SetSourceRect pfnSetSourceRect;
+ BaseControlVideo_SetTargetRect pfnSetTargetRect;
+} BaseControlVideoFuncTable;
+
+HRESULT basic_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
+ struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table) DECLSPEC_HIDDEN;
+HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo) DECLSPEC_HIDDEN;
+
#endif /* __QUARTZ_PRIVATE_INCLUDED__ */
diff --git a/dlls/strmbase/video.c b/dlls/quartz/video.c
similarity index 98%
rename from dlls/strmbase/video.c
rename to dlls/quartz/video.c
index 081794e9b31..f59c2dee0cc 100644
--- a/dlls/strmbase/video.c
+++ b/dlls/quartz/video.c
@@ -1,5 +1,5 @@
/*
- * Generic Implementation of strmbase video classes
+ * Common implementation of IBasicVideo
*
* Copyright 2012 Aric Stewart, CodeWeavers
*
@@ -18,9 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "strmbase_private.h"
+#include "quartz_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
+WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static inline BaseControlVideo *impl_from_IBasicVideo(IBasicVideo *iface)
{
@@ -647,7 +647,7 @@ static const IBasicVideoVtbl basic_video_vtbl =
basic_video_IsUsingDefaultDestination
};
-HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
+HRESULT basic_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table)
{
video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl;
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 52d4b1aa623..1b5e68e7d5b 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -726,7 +726,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
if (FAILED(hr))
goto fail;
- hr = strmbase_video_init(&pVideoRenderer->baseControlVideo, &pVideoRenderer->renderer.filter,
+ hr = basic_video_init(&pVideoRenderer->baseControlVideo, &pVideoRenderer->renderer.filter,
&pVideoRenderer->renderer.sink.pin, &renderer_BaseControlVideoFuncTable);
if (FAILED(hr))
goto fail;
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index c457f31e4e8..b8cf0698ecd 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -2257,7 +2257,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
if (FAILED(hr = BaseWindowImpl_PrepareWindow(&pVMR->baseControlWindow.baseWindow)))
goto fail;
- hr = strmbase_video_init(&pVMR->baseControlVideo, &pVMR->renderer.filter,
+ hr = basic_video_init(&pVMR->baseControlVideo, &pVMR->renderer.filter,
&pVMR->renderer.sink.pin, &renderer_BaseControlVideoFuncTable);
if (FAILED(hr))
goto fail;
diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in
index 607ce235bb7..ec13acccf40 100644
--- a/dlls/strmbase/Makefile.in
+++ b/dlls/strmbase/Makefile.in
@@ -9,5 +9,4 @@ C_SRCS = \
pospass.c \
qualitycontrol.c \
renderer.c \
- seeking.c \
- video.c
+ seeking.c
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index f874a441862..0bcac13ebbc 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -255,49 +255,6 @@ enum strmbase_type_id
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
-#ifdef __IBasicVideo_FWD_DEFINED__
-#ifdef __amvideo_h__
-typedef struct tagBaseControlVideo
-{
- IBasicVideo IBasicVideo_iface;
-
- struct strmbase_filter *pFilter;
- struct strmbase_pin *pPin;
-
- const struct BaseControlVideoFuncTable* pFuncsTable;
-} BaseControlVideo;
-
-typedef HRESULT (WINAPI *BaseControlVideo_GetSourceRect)(BaseControlVideo* This, RECT *pSourceRect);
-typedef HRESULT (WINAPI *BaseControlVideo_GetStaticImage)(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage);
-typedef HRESULT (WINAPI *BaseControlVideo_GetTargetRect)(BaseControlVideo* This, RECT *pTargetRect);
-typedef VIDEOINFOHEADER* (WINAPI *BaseControlVideo_GetVideoFormat)(BaseControlVideo* This);
-typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultSourceRect)(BaseControlVideo* This);
-typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultTargetRect)(BaseControlVideo* This);
-typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultSourceRect)(BaseControlVideo* This);
-typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultTargetRect)(BaseControlVideo* This);
-typedef HRESULT (WINAPI *BaseControlVideo_SetSourceRect)(BaseControlVideo* This, RECT *pSourceRect);
-typedef HRESULT (WINAPI *BaseControlVideo_SetTargetRect)(BaseControlVideo* This, RECT *pTargetRect);
-
-typedef struct BaseControlVideoFuncTable {
- /* Required */
- BaseControlVideo_GetSourceRect pfnGetSourceRect;
- BaseControlVideo_GetStaticImage pfnGetStaticImage;
- BaseControlVideo_GetTargetRect pfnGetTargetRect;
- BaseControlVideo_GetVideoFormat pfnGetVideoFormat;
- BaseControlVideo_IsDefaultSourceRect pfnIsDefaultSourceRect;
- BaseControlVideo_IsDefaultTargetRect pfnIsDefaultTargetRect;
- BaseControlVideo_SetDefaultSourceRect pfnSetDefaultSourceRect;
- BaseControlVideo_SetDefaultTargetRect pfnSetDefaultTargetRect;
- BaseControlVideo_SetSourceRect pfnSetSourceRect;
- BaseControlVideo_SetTargetRect pfnSetTargetRect;
-} BaseControlVideoFuncTable;
-
-HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
- struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table);
-HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
-#endif
-#endif
-
struct strmbase_renderer
{
struct strmbase_filter filter;
--
2.25.1
More information about the wine-devel
mailing list