Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2019
- 76 participants
- 2386 messages
Re: [PATCH 2/5] quartz/tests/mpegsplit: Add some tests for IBaseFilter_EnumPins().
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=48467
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/quartz/tests/mpegsplit.c:22
Task: Patch failed to apply
=== debian9 (build log) ===
error: patch failed: dlls/quartz/tests/mpegsplit.c:22
Task: Patch failed to apply
=== debian9 (build log) ===
error: patch failed: dlls/quartz/tests/mpegsplit.c:22
Task: Patch failed to apply
March 1, 2019
[PATCH 5/5] quartz/tests/mpegsplit: Add some tests for pin interfaces.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/mpegsplit.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c
index 0745f01635..9a63636337 100644
--- a/dlls/quartz/tests/mpegsplit.c
+++ b/dlls/quartz/tests/mpegsplit.c
@@ -117,7 +117,10 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
static void test_interfaces(void)
{
+ const WCHAR *filename = load_resource(mp3file);
IBaseFilter *filter = create_mpeg_splitter();
+ IFilterGraph2 *graph = connect_input(filter, filename);
+ IPin *pin;
check_interface(filter, &IID_IAMStreamSelect, TRUE);
check_interface(filter, &IID_IBaseFilter, TRUE);
@@ -138,7 +141,35 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
+ IBaseFilter_FindPin(filter, inputW, &pin);
+
+ todo_wine check_interface(pin, &IID_IMemInputPin, 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);
+ todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE);
+
+ IPin_Release(pin);
+
+ IBaseFilter_FindPin(filter, audioW, &pin);
+
+ check_interface(pin, &IID_IMediaSeeking, 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_IAsyncReader, FALSE);
+ check_interface(pin, &IID_IKsPropertySet, FALSE);
+ check_interface(pin, &IID_IMediaPosition, FALSE);
+
+ IPin_Release(pin);
+
IBaseFilter_Release(filter);
+ IFilterGraph2_Release(graph);
+ DeleteFileW(filename);
}
static void test_enum_pins(void)
--
2.20.1
March 1, 2019
[PATCH 4/5] quartz/tests/mpegsplit: Add some tests for querying pin information.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/mpegsplit.c | 72 +++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c
index eb814793bc..0745f01635 100644
--- a/dlls/quartz/tests/mpegsplit.c
+++ b/dlls/quartz/tests/mpegsplit.c
@@ -323,6 +323,77 @@ static void test_find_pin(void)
ok(ret, "Failed to delete file, error %u.\n", GetLastError());
}
+static void test_pin_info(void)
+{
+ const WCHAR *filename = load_resource(mp3file);
+ IBaseFilter *filter = create_mpeg_splitter();
+ ULONG ref, expect_ref;
+ IFilterGraph2 *graph;
+ PIN_DIRECTION dir;
+ PIN_INFO info;
+ HRESULT hr;
+ WCHAR *id;
+ IPin *pin;
+ BOOL ret;
+
+ graph = connect_input(filter, filename);
+
+ hr = IBaseFilter_FindPin(filter, inputW, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ expect_ref = get_refcount(filter);
+ ref = get_refcount(pin);
+ ok(ref == expect_ref, "Got unexpected refcount %d.\n", ref);
+
+ hr = IPin_QueryPinInfo(pin, &info);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
+ ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
+ ok(!lstrcmpW(info.achName, inputW), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ref = get_refcount(filter);
+ ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref);
+ ref = get_refcount(pin);
+ todo_wine ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref);
+ IBaseFilter_Release(info.pFilter);
+
+ hr = IPin_QueryDirection(pin, &dir);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
+
+ hr = IPin_QueryId(pin, &id);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(!lstrcmpW(id, inputW), "Got id %s.\n", wine_dbgstr_w(id));
+ CoTaskMemFree(id);
+
+ IPin_Release(pin);
+
+ hr = IBaseFilter_FindPin(filter, audioW, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IPin_QueryPinInfo(pin, &info);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
+ ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
+ ok(!lstrcmpW(info.achName, audioW), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ IBaseFilter_Release(info.pFilter);
+
+ hr = IPin_QueryDirection(pin, &dir);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
+
+ hr = IPin_QueryId(pin, &id);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(!lstrcmpW(id, audioW), "Got id %s.\n", wine_dbgstr_w(id));
+ CoTaskMemFree(id);
+
+ IPin_Release(pin);
+
+ IFilterGraph2_Release(graph);
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ret = DeleteFileW(filename);
+ ok(ret, "Failed to delete file, error %u.\n", GetLastError());
+}
+
START_TEST(mpegsplit)
{
CoInitialize(NULL);
@@ -330,6 +401,7 @@ START_TEST(mpegsplit)
test_interfaces();
test_enum_pins();
test_find_pin();
+ test_pin_info();
CoUninitialize();
}
--
2.20.1
March 1, 2019
[PATCH 3/5] quartz/tests/mpegsplit: Add some tests for IBaseFilter_FindPin().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/mpegsplit.c | 55 +++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c
index 4cf1633967..eb814793bc 100644
--- a/dlls/quartz/tests/mpegsplit.c
+++ b/dlls/quartz/tests/mpegsplit.c
@@ -25,6 +25,7 @@
static const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0};
static const WCHAR inputW[] = {'I','n','p','u','t',0};
+static const WCHAR audioW[] = {'A','u','d','i','o',0};
static IBaseFilter *create_mpeg_splitter(void)
{
@@ -269,12 +270,66 @@ todo_wine
ok(ret, "Failed to delete file, error %u.\n", GetLastError());
}
+static void test_find_pin(void)
+{
+ static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0};
+ const WCHAR *filename = load_resource(mp3file);
+ IBaseFilter *filter = create_mpeg_splitter();
+ IFilterGraph2 *graph;
+ IEnumPins *enum_pins;
+ IPin *pin, *pin2;
+ HRESULT hr;
+ ULONG ref;
+ BOOL ret;
+
+ hr = IBaseFilter_FindPin(filter, input_pinW, &pin);
+ ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
+
+ hr = IBaseFilter_FindPin(filter, inputW, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ IPin_Release(pin);
+
+ hr = IBaseFilter_FindPin(filter, audioW, &pin);
+ ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
+
+ graph = connect_input(filter, filename);
+
+ hr = IBaseFilter_EnumPins(filter, &enum_pins);
+ 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);
+
+ hr = IBaseFilter_FindPin(filter, inputW, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
+ IPin_Release(pin);
+ IPin_Release(pin2);
+
+ hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IBaseFilter_FindPin(filter, audioW, &pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin);
+ IPin_Release(pin);
+ IPin_Release(pin2);
+
+ IEnumPins_Release(enum_pins);
+ IFilterGraph2_Release(graph);
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ret = DeleteFileW(filename);
+ ok(ret, "Failed to delete file, error %u.\n", GetLastError());
+}
+
START_TEST(mpegsplit)
{
CoInitialize(NULL);
test_interfaces();
test_enum_pins();
+ test_find_pin();
CoUninitialize();
}
--
2.20.1
March 1, 2019
[PATCH 2/5] quartz/tests/mpegsplit: Add some tests for IBaseFilter_EnumPins().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/mpegsplit.c | 198 ++++++++++++++++++++++++++++++++++
1 file changed, 198 insertions(+)
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c
index caadfbed74..4cf1633967 100644
--- a/dlls/quartz/tests/mpegsplit.c
+++ b/dlls/quartz/tests/mpegsplit.c
@@ -22,6 +22,10 @@
#include "dshow.h"
#include "wine/test.h"
+static const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0};
+
+static const WCHAR inputW[] = {'I','n','p','u','t',0};
+
static IBaseFilter *create_mpeg_splitter(void)
{
IBaseFilter *filter = NULL;
@@ -31,6 +35,70 @@ static IBaseFilter *create_mpeg_splitter(void)
return filter;
}
+static WCHAR *load_resource(const WCHAR *name)
+{
+ static WCHAR pathW[MAX_PATH];
+ DWORD written;
+ HANDLE file;
+ HRSRC res;
+ void *ptr;
+
+ GetTempPathW(ARRAY_SIZE(pathW), pathW);
+ lstrcatW(pathW, name);
+
+ file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
+ ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n",
+ wine_dbgstr_w(pathW), GetLastError());
+
+ res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA);
+ ok(!!res, "Failed to load resource, error %u.\n", GetLastError());
+ ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res));
+ WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL);
+ ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n");
+ CloseHandle(file);
+
+ return pathW;
+}
+
+static ULONG get_refcount(void *iface)
+{
+ IUnknown *unknown = iface;
+ IUnknown_AddRef(unknown);
+ return IUnknown_Release(unknown);
+}
+
+static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename)
+{
+ static const WCHAR outputW[] = {'O','u','t','p','u','t',0};
+ IFileSourceFilter *filesource;
+ IFilterGraph2 *graph;
+ IBaseFilter *reader;
+ IPin *source, *sink;
+ HRESULT hr;
+
+ CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IBaseFilter, (void **)&reader);
+ IBaseFilter_QueryInterface(reader, &IID_IFileSourceFilter, (void **)&filesource);
+ IFileSourceFilter_Load(filesource, filename, NULL);
+
+ CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IFilterGraph2, (void **)&graph);
+ IFilterGraph2_AddFilter(graph, reader, NULL);
+ IFilterGraph2_AddFilter(graph, splitter, NULL);
+
+ IBaseFilter_FindPin(splitter, inputW, &sink);
+ IBaseFilter_FindPin(reader, outputW, &source);
+
+ hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ IPin_Release(source);
+ IPin_Release(sink);
+ IBaseFilter_Release(reader);
+ IFileSourceFilter_Release(filesource);
+ return graph;
+}
+
#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)
{
@@ -72,11 +140,141 @@ static void test_interfaces(void)
IBaseFilter_Release(filter);
}
+static void test_enum_pins(void)
+{
+ const WCHAR *filename = load_resource(mp3file);
+ IBaseFilter *filter = create_mpeg_splitter();
+ IEnumPins *enum1, *enum2;
+ IFilterGraph2 *graph;
+ ULONG count, ref;
+ IPin *pins[3];
+ HRESULT hr;
+ BOOL ret;
+
+ ref = get_refcount(filter);
+ ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+
+ hr = IBaseFilter_EnumPins(filter, &enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ref = get_refcount(filter);
+ ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ref = get_refcount(enum1);
+ ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ref = get_refcount(filter);
+todo_wine
+ ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ref = get_refcount(pins[0]);
+todo_wine
+ ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ref = get_refcount(enum1);
+ ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ IPin_Release(pins[0]);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 1, pins, &count);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(count == 1, "Got count %u.\n", count);
+ IPin_Release(pins[0]);
+
+ hr = IEnumPins_Next(enum1, 1, pins, &count);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(!count, "Got count %u.\n", count);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 2, pins, NULL);
+ ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 2, pins, &count);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(count == 1, "Got count %u.\n", count);
+ IPin_Release(pins[0]);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Clone(enum1, &enum2);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Skip(enum1, 2);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Skip(enum1, 1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Skip(enum1, 1);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum2, 1, pins, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ IPin_Release(pins[0]);
+
+ IEnumPins_Release(enum2);
+
+ graph = connect_input(filter, filename);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+todo_wine
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ IPin_Release(pins[0]);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ IPin_Release(pins[0]);
+
+ hr = IEnumPins_Next(enum1, 1, pins, NULL);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 2, pins, &count);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(count == 2, "Got count %u.\n", count);
+ IPin_Release(pins[0]);
+ IPin_Release(pins[1]);
+
+ hr = IEnumPins_Reset(enum1);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IEnumPins_Next(enum1, 3, pins, &count);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(count == 2, "Got count %u.\n", count);
+ IPin_Release(pins[0]);
+ IPin_Release(pins[1]);
+
+ IEnumPins_Release(enum1);
+ IFilterGraph2_Release(graph);
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ret = DeleteFileW(filename);
+ ok(ret, "Failed to delete file, error %u.\n", GetLastError());
+}
+
START_TEST(mpegsplit)
{
CoInitialize(NULL);
test_interfaces();
+ test_enum_pins();
CoUninitialize();
}
--
2.20.1
March 1, 2019
[PATCH 1/5] quartz/mpegsplit: Fix sink pin name.
by Zebediah Figura
This fixes a bug with Neocron 2, which uses FindPin() to retrieve the
sink pin.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/avisplit.c | 7 ++++++-
dlls/quartz/mpegsplit.c | 6 +++++-
dlls/quartz/parser.c | 10 +++++++---
dlls/quartz/parser.h | 7 +++++--
dlls/quartz/waveparser.c | 6 +++++-
5 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index 6f27c29321..40020bbfa9 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -1429,6 +1429,7 @@ static const IBaseFilterVtbl AVISplitterImpl_Vtbl =
HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
+ static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
HRESULT hr;
AVISplitterImpl * This;
@@ -1445,7 +1446,11 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
This->streams = NULL;
This->oldindex = NULL;
- hr = Parser_Create(&(This->Parser), &AVISplitterImpl_Vtbl, &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Flush, AVISplitter_Disconnect, AVISplitter_first_request, AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
+ hr = Parser_Create(&This->Parser, &AVISplitterImpl_Vtbl, &CLSID_AviSplitter,
+ sink_name, AVISplitter_Sample, AVISplitter_QueryAccept,
+ AVISplitter_InputPin_PreConnect, AVISplitter_Flush,
+ AVISplitter_Disconnect, AVISplitter_first_request,
+ AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
if (FAILED(hr))
return hr;
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index 5869f1664c..226fcacff5 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -870,6 +870,7 @@ static const IAMStreamSelectVtbl AMStreamSelectVtbl =
HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
+ static const WCHAR sink_name[] = {'I','n','p','u','t',0};
MPEGSplitterImpl *This;
HRESULT hr = E_FAIL;
@@ -885,7 +886,10 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
return E_OUTOFMEMORY;
ZeroMemory(This, sizeof(MPEGSplitterImpl));
- hr = Parser_Create(&(This->Parser), &MPEGSplitter_Vtbl, &CLSID_MPEG1Splitter, MPEGSplitter_process_sample, MPEGSplitter_query_accept, MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_disconnect, MPEGSplitter_first_request, NULL, NULL, MPEGSplitter_seek, NULL);
+ hr = Parser_Create(&This->Parser, &MPEGSplitter_Vtbl, &CLSID_MPEG1Splitter,
+ sink_name, MPEGSplitter_process_sample, MPEGSplitter_query_accept,
+ MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_disconnect,
+ MPEGSplitter_first_request, NULL, NULL, MPEGSplitter_seek, NULL);
if (FAILED(hr))
{
CoTaskMemFree(This);
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index 664cecf07d..b0cb500c56 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -35,7 +35,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
static const IMediaSeekingVtbl Parser_Seeking_Vtbl;
static const IPinVtbl Parser_OutputPin_Vtbl;
static const IPinVtbl Parser_InputPin_Vtbl;
@@ -93,7 +92,12 @@ static const BaseFilterFuncTable BaseFuncTable = {
Parser_GetPinCount
};
-HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, const CLSID* pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest, STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
+HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl,
+ const CLSID* pClsid, const WCHAR *sink_name, PFN_PROCESS_SAMPLE fnProcessSample,
+ PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect,
+ PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest,
+ STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop,
+ SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
{
HRESULT hr;
PIN_INFO piInput;
@@ -109,7 +113,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c
/* construct input pin */
piInput.dir = PINDIR_INPUT;
piInput.pFilter = &pParser->filter.IBaseFilter_iface;
- lstrcpynW(piInput.achName, wcsInputPinName, ARRAY_SIZE(piInput.achName));
+ lstrcpynW(piInput.achName, sink_name, ARRAY_SIZE(piInput.achName));
if (!start)
start = Parser_ChangeStart;
diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h
index 840e475ee2..8660cf2cde 100644
--- a/dlls/quartz/parser.h
+++ b/dlls/quartz/parser.h
@@ -53,8 +53,11 @@ typedef struct Parser_OutputPin
extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
-extern HRESULT Parser_Create(ParserImpl*, const IBaseFilterVtbl *, const CLSID*, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT,
- PFN_CLEANUP, PFN_DISCONNECT, REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate);
+HRESULT Parser_Create(ParserImpl *parser, const IBaseFilterVtbl *vtbl,
+ const CLSID *clsid, const WCHAR *sink_name, PFN_PROCESS_SAMPLE,
+ PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, PFN_DISCONNECT,
+ REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop,
+ SourceSeeking_ChangeStart, SourceSeeking_ChangeRate) DECLSPEC_HIDDEN;
/* Override the _Release function and call this when releasing */
extern void Parser_Destroy(ParserImpl *This);
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c
index fa9cd45d27..834b6344d2 100644
--- a/dlls/quartz/waveparser.c
+++ b/dlls/quartz/waveparser.c
@@ -417,6 +417,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl =
HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
{
+ static const WCHAR sink_name[] = {'i','n','p','u','t',' ','p','i','n',0};
HRESULT hr;
WAVEParserImpl * This;
@@ -430,7 +431,10 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
/* Note: This memory is managed by the transform filter once created */
This = CoTaskMemAlloc(sizeof(WAVEParserImpl));
- hr = Parser_Create(&(This->Parser), &WAVEParser_Vtbl, &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect, WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
+ hr = Parser_Create(&This->Parser, &WAVEParser_Vtbl, &CLSID_WAVEParser,
+ sink_name, WAVEParser_Sample, WAVEParser_QueryAccept,
+ WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect,
+ WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
if (FAILED(hr))
return hr;
--
2.20.1
March 1, 2019