quartz/vmr9: Don't expose IVMRSurfaceAllocatorNotify from the VMR9.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-28 17:44:43 -05:00 committed by Alexandre Julliard
parent 88b9d1a538
commit 44386de52a
2 changed files with 9 additions and 3 deletions

View File

@ -298,7 +298,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRMixerControl, FALSE);
todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE);
todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
todo_wine check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);

View File

@ -91,6 +91,11 @@ struct quartz_vmr
HANDLE run_event;
};
static inline BOOL is_vmr9(const struct quartz_vmr *filter)
{
return IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer9);
}
static inline struct quartz_vmr *impl_from_video_window(struct video_window *iface)
{
return CONTAINING_RECORD(iface, struct quartz_vmr, baseControlWindow);
@ -435,7 +440,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_M
return E_FAIL;
}
if (IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer))
if (!is_vmr9(filter))
{
switch (filter->bmiheader.biBitCount)
{
@ -621,7 +626,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid,
*out = &filter->IVMRMonitorConfig_iface;
else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9))
*out = &filter->IVMRMonitorConfig9_iface;
else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify) && filter->mode == (VMR9Mode)VMRMode_Renderless)
else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify)
&& filter->mode == (VMR9Mode)VMRMode_Renderless && !is_vmr9(filter))
*out = &filter->IVMRSurfaceAllocatorNotify_iface;
else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify9) && filter->mode == VMR9Mode_Renderless)
*out = &filter->IVMRSurfaceAllocatorNotify9_iface;