Jactry Zeng : qcap/tests: Add interface tests for video capture filter.
Alexandre Julliard
julliard at winehq.org
Tue May 12 16:59:27 CDT 2020
Module: wine
Branch: master
Commit: ecf825afc7ee453747fd74fb99706cc502609e1c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ecf825afc7ee453747fd74fb99706cc502609e1c
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Tue May 12 21:35:26 2020 +0800
qcap/tests: Add interface tests for video capture filter.
Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/tests/videocapture.c | 52 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c
index 448136791b..cd613b00e7 100644
--- a/dlls/qcap/tests/videocapture.c
+++ b/dlls/qcap/tests/videocapture.c
@@ -23,6 +23,21 @@
#include "wine/test.h"
#include "wine/strmbase.h"
+#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
+static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
+{
+ IUnknown *iface = iface_ptr;
+ HRESULT hr, expected_hr;
+ IUnknown *unk;
+
+ expected_hr = supported ? S_OK : E_NOINTERFACE;
+
+ hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
+ ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ if (SUCCEEDED(hr))
+ IUnknown_Release(unk);
+}
+
static void test_media_types(IPin *pin)
{
IEnumMediaTypes *enum_media_types;
@@ -176,11 +191,48 @@ static void test_capture(IBaseFilter *filter)
{
test_media_types(pin);
test_stream_config(pin);
+
+ todo_wine check_interface(pin, &IID_IAMBufferNegotiation, TRUE);
+ check_interface(pin, &IID_IAMStreamConfig, TRUE);
+ todo_wine check_interface(pin, &IID_IAMStreamControl, TRUE);
+ check_interface(pin, &IID_IKsPropertySet, TRUE);
+ todo_wine check_interface(pin, &IID_IMediaSeeking, TRUE);
+ check_interface(pin, &IID_IPin, TRUE);
+ todo_wine check_interface(pin, &IID_IQualityControl, TRUE);
+ todo_wine check_interface(pin, &IID_ISpecifyPropertyPages, TRUE);
+
+ check_interface(pin, &IID_IAMCrossbar, FALSE);
+ check_interface(pin, &IID_IAMDroppedFrames, FALSE);
+ check_interface(pin, &IID_IAMFilterMiscFlags, FALSE);
+ check_interface(pin, &IID_IAMPushSource, FALSE);
+ check_interface(pin, &IID_IAMTVTuner, FALSE);
+ check_interface(pin, &IID_IAMVideoCompression, FALSE);
+ check_interface(pin, &IID_IAMVideoProcAmp, FALSE);
+ check_interface(pin, &IID_IPersistPropertyBag, FALSE);
}
IPin_Release(pin);
}
IEnumPins_Release(enum_pins);
+
+ todo_wine check_interface(filter, &IID_IAMFilterMiscFlags, TRUE);
+ todo_wine check_interface(filter, &IID_IAMVideoControl, TRUE);
+ check_interface(filter, &IID_IAMVideoProcAmp, TRUE);
+ check_interface(filter, &IID_IBaseFilter, TRUE);
+ todo_wine check_interface(filter, &IID_IKsPropertySet, TRUE);
+ todo_wine check_interface(filter, &IID_IMediaSeeking, TRUE);
+ check_interface(filter, &IID_IPersistPropertyBag, TRUE);
+ todo_wine check_interface(filter, &IID_ISpecifyPropertyPages, TRUE);
+
+ check_interface(filter, &IID_IAMCrossbar, FALSE);
+ check_interface(filter, &IID_IAMPushSource, FALSE);
+ check_interface(filter, &IID_IAMStreamConfig, FALSE);
+ check_interface(filter, &IID_IAMTVTuner, FALSE);
+ check_interface(filter, &IID_IAMVideoCompression, FALSE);
+ check_interface(filter, &IID_IAMVfwCaptureDialogs, FALSE);
+ check_interface(filter, &IID_IPin, FALSE);
+ check_interface(filter, &IID_IReferenceClock, FALSE);
+ check_interface(filter, &IID_IOverlayNotify, FALSE);
}
START_TEST(videocapture)
More information about the wine-cvs
mailing list