Zebediah Figura : qcap/tests: Add some tests for IBaseFilter::FindPin() on the smart tee filter.
Alexandre Julliard
julliard at winehq.org
Fri Apr 12 13:11:49 CDT 2019
Module: wine
Branch: master
Commit: 4862f8404b13e9509b203da31a47c093eb38617d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4862f8404b13e9509b203da31a47c093eb38617d
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Fri Apr 12 00:20:54 2019 -0500
qcap/tests: Add some tests for IBaseFilter::FindPin() on the smart tee filter.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/tests/smartteefilter.c | 45 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c
index cdd09f0..f931d0b 100644
--- a/dlls/qcap/tests/smartteefilter.c
+++ b/dlls/qcap/tests/smartteefilter.c
@@ -22,6 +22,10 @@
#include "dshow.h"
#include "wine/test.h"
+static const WCHAR sink_id[] = {'I','n','p','u','t',0};
+static const WCHAR capture_id[] = {'C','a','p','t','u','r','e',0};
+static const WCHAR preview_id[] = {'P','r','e','v','i','e','w',0};
+
static HANDLE event;
static IBaseFilter *create_smart_tee(void)
@@ -222,6 +226,46 @@ static void test_enum_pins(void)
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
+static void test_find_pin(void)
+{
+ IBaseFilter *filter = create_smart_tee();
+ IEnumPins *enum_pins;
+ IPin *pin, *pin2;
+ HRESULT hr;
+ ULONG ref;
+
+ hr = IBaseFilter_EnumPins(filter, &enum_pins);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IBaseFilter_FindPin(filter, sink_id, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
+ IPin_Release(pin2);
+ IPin_Release(pin);
+
+ hr = IBaseFilter_FindPin(filter, capture_id, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
+ IPin_Release(pin2);
+ IPin_Release(pin);
+
+ hr = IBaseFilter_FindPin(filter, preview_id, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
+ IPin_Release(pin2);
+ IPin_Release(pin);
+
+ IEnumPins_Release(enum_pins);
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
+}
+
typedef struct {
IBaseFilter IBaseFilter_iface;
LONG ref;
@@ -2216,6 +2260,7 @@ START_TEST(smartteefilter)
test_interfaces();
test_enum_pins();
+ test_find_pin();
test_smart_tee_filter_aggregation();
test_smart_tee_filter();
More information about the wine-cvs
mailing list