Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 21 ++++----------------- dlls/quartz/tests/vmr7.c | 21 ++++----------------- dlls/quartz/tests/vmr9.c | 22 ++++------------------ 3 files changed, 12 insertions(+), 52 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 55a704f82ba..ce02977ff61 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -522,31 +522,18 @@ static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDI return S_OK; }
-static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface, +static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - HRESULT hr; - - iface->pin.peer = peer; - IPin_AddRef(peer); - CopyMediaType(&iface->pin.mt, mt); - - if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) - { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - IPin_Release(peer); - iface->pin.peer = NULL; - FreeMediaType(&iface->pin.mt); - } - - return hr; + return S_OK; }
static const struct strmbase_source_ops testsource_ops = { .base.pin_query_accept = testsource_query_accept, .base.pin_get_media_type = strmbase_pin_get_media_type, - .pfnAttemptConnection = testsource_AttemptConnection, + .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, + .pfnDecideAllocator = testsource_DecideAllocator, };
static void testfilter_init(struct testfilter *filter) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 8a17bdcd19f..c4190b17712 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -872,31 +872,18 @@ static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDI return S_OK; }
-static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface, +static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - HRESULT hr; - - iface->pin.peer = peer; - IPin_AddRef(peer); - CopyMediaType(&iface->pin.mt, mt); - - if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) - { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - IPin_Release(peer); - iface->pin.peer = NULL; - FreeMediaType(&iface->pin.mt); - } - - return hr; + return S_OK; }
static const struct strmbase_source_ops testsource_ops = { .base.pin_query_accept = testsource_query_accept, .base.pin_get_media_type = strmbase_pin_get_media_type, - .pfnAttemptConnection = testsource_AttemptConnection, + .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, + .pfnDecideAllocator = testsource_DecideAllocator, };
static void testfilter_init(struct testfilter *filter) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index ed3f7cd38bb..3a3c8bf6554 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -876,32 +876,18 @@ static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDI return S_OK; }
-static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface, +static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, IPin *peer, const AM_MEDIA_TYPE *mt) { - HRESULT hr; - - iface->pin.peer = peer; - IPin_AddRef(peer); - CopyMediaType(&iface->pin.mt, mt); - - if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) - { - todo_wine_if (((VIDEOINFOHEADER *)mt->pbFormat)->bmiHeader.biBitCount == 24) - ok(hr == VFW_E_TYPE_NOT_ACCEPTED || hr == E_FAIL, "Got hr %#x.\n", hr); - IPin_Release(peer); - iface->pin.peer = NULL; - FreeMediaType(&iface->pin.mt); - } - - return hr; + return S_OK; }
static const struct strmbase_source_ops testsource_ops = { .base.pin_query_accept = testsource_query_accept, .base.pin_get_media_type = strmbase_pin_get_media_type, - .pfnAttemptConnection = testsource_AttemptConnection, + .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, + .pfnDecideAllocator = testsource_DecideAllocator, };
static void testfilter_init(struct testfilter *filter)