Commit f55427fb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Move video.c to quartz.

The only filters that expose IBasicVideo live in quartz. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bb891192
......@@ -17,6 +17,7 @@ C_SRCS = \
memallocator.c \
regsvr.c \
systemclock.c \
video.c \
videorenderer.c \
vmr9.c \
window.c
......
......@@ -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);
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
{
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__ */
/*
* 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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -9,5 +9,4 @@ C_SRCS = \
pospass.c \
qualitycontrol.c \
renderer.c \
seeking.c \
video.c
seeking.c
......@@ -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;
......
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