[PATCH 3/5] quartz/tests: Test more VMR7 interfaces in all modes.
Zebediah Figura
zfigura at codeweavers.com
Wed Apr 13 17:02:01 CDT 2022
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/quartz/tests/vmr7.c | 71 ++++++++++++++--------------------------
1 file changed, 24 insertions(+), 47 deletions(-)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c
index 2cff39a867c..9049f8d726b 100644
--- a/dlls/quartz/tests/vmr7.c
+++ b/dlls/quartz/tests/vmr7.c
@@ -219,17 +219,13 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
IUnknown_Release(unk);
}
-static void test_interfaces(void)
+static void test_common_interfaces(IBaseFilter *filter)
{
- IBaseFilter *filter = create_vmr7(0);
- ULONG ref;
IPin *pin;
check_interface(filter, &IID_IAMCertifiedOutputProtection, TRUE);
check_interface(filter, &IID_IAMFilterMiscFlags, TRUE);
check_interface(filter, &IID_IBaseFilter, TRUE);
- check_interface(filter, &IID_IBasicVideo, TRUE);
- todo_wine check_interface(filter, &IID_IBasicVideo2, TRUE);
todo_wine check_interface(filter, &IID_IKsPropertySet, TRUE);
check_interface(filter, &IID_IMediaFilter, TRUE);
check_interface(filter, &IID_IMediaPosition, TRUE);
@@ -238,12 +234,10 @@ static void test_interfaces(void)
check_interface(filter, &IID_IQualityControl, TRUE);
todo_wine check_interface(filter, &IID_IQualProp, TRUE);
check_interface(filter, &IID_IUnknown, TRUE);
- check_interface(filter, &IID_IVideoWindow, TRUE);
todo_wine check_interface(filter, &IID_IVMRAspectRatioControl, TRUE);
todo_wine check_interface(filter, &IID_IVMRDeinterlaceControl, TRUE);
check_interface(filter, &IID_IVMRFilterConfig, TRUE);
todo_wine check_interface(filter, &IID_IVMRMixerBitmap, TRUE);
- check_interface(filter, &IID_IVMRMonitorConfig, TRUE);
check_interface(filter, &IID_IBasicAudio, FALSE);
check_interface(filter, &IID_IDirectDrawVideo, FALSE);
@@ -254,12 +248,9 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVMRDeinterlaceControl9, FALSE);
check_interface(filter, &IID_IVMRFilterConfig9, FALSE);
check_interface(filter, &IID_IVMRMixerBitmap9, FALSE);
- check_interface(filter, &IID_IVMRMixerControl, FALSE);
check_interface(filter, &IID_IVMRMixerControl9, FALSE);
check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
- check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE);
- check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
@@ -275,8 +266,27 @@ static void test_interfaces(void)
check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin);
+}
+
+static void test_interfaces(void)
+{
+ IBaseFilter *filter = create_vmr7(0);
+ ULONG ref;
+
+ test_common_interfaces(filter);
+
+ check_interface(filter, &IID_IBasicVideo, TRUE);
+ todo_wine check_interface(filter, &IID_IBasicVideo2, TRUE);
+ check_interface(filter, &IID_IVideoWindow, TRUE);
+ check_interface(filter, &IID_IVMRMonitorConfig, TRUE);
+
+ check_interface(filter, &IID_IVMRMixerControl, FALSE);
+ check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
+ check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
+
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
- IBaseFilter_Release(filter);
filter = create_vmr7(VMRMode_Windowless);
check_interface(filter, &IID_IVMRMonitorConfig, TRUE);
@@ -285,28 +295,12 @@ static void test_interfaces(void)
todo_wine check_interface(filter, &IID_IBasicVideo, FALSE);
check_interface(filter, &IID_IBasicVideo2, FALSE);
todo_wine check_interface(filter, &IID_IVideoWindow, FALSE);
- check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
- check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE);
check_interface(filter, &IID_IVMRMixerControl, FALSE);
- check_interface(filter, &IID_IVMRMixerControl9, FALSE);
- check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
- check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
+ check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
- IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
- check_interface(pin, &IID_IMemInputPin, TRUE);
- check_interface(pin, &IID_IOverlay, TRUE);
- check_interface(pin, &IID_IPin, TRUE);
- todo_wine check_interface(pin, &IID_IQualityControl, TRUE);
- check_interface(pin, &IID_IUnknown, TRUE);
-
- check_interface(pin, &IID_IKsPropertySet, FALSE);
- check_interface(pin, &IID_IMediaPosition, FALSE);
- check_interface(pin, &IID_IMediaSeeking, FALSE);
-
- IPin_Release(pin);
-
- IBaseFilter_Release(filter);
filter = create_vmr7(VMRMode_Renderless);
check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, TRUE);
@@ -316,24 +310,7 @@ static void test_interfaces(void)
todo_wine check_interface(filter, &IID_IVideoWindow, FALSE);
check_interface(filter, &IID_IVMRMixerControl, FALSE);
todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE);
- check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
- check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE);
check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
- check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
-
- IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
-
- check_interface(pin, &IID_IMemInputPin, TRUE);
- check_interface(pin, &IID_IOverlay, TRUE);
- check_interface(pin, &IID_IPin, TRUE);
- todo_wine check_interface(pin, &IID_IQualityControl, TRUE);
- check_interface(pin, &IID_IUnknown, TRUE);
-
- check_interface(pin, &IID_IKsPropertySet, FALSE);
- check_interface(pin, &IID_IMediaPosition, FALSE);
- check_interface(pin, &IID_IMediaSeeking, FALSE);
-
- IPin_Release(pin);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %ld.\n", ref);
--
2.35.1
More information about the wine-devel
mailing list