From d9f6a377be134a553d29132d7db4daa6c917f778 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 24 Feb 2014 12:06:34 +0100 Subject: [PATCH] qcap: Add Avi Mux input pin IMemInputPin::GetAllocatorRequirements implementation. --- dlls/qcap/avimux.c | 11 +++++++++-- dlls/qcap/tests/qcap.c | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index c5a16f8a115..f39e0038572 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1365,8 +1365,15 @@ static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocatorRequirements( { AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface); AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface); - FIXME("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pProps); - return E_NOTIMPL; + + TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pProps); + + if(!pProps) + return E_POINTER; + + pProps->cbAlign = 1; + pProps->cbPrefix = 8; + return S_OK; } static HRESULT WINAPI AviMuxIn_MemInputPin_Receive( diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c index 83d38c81f7f..162b17e9e29 100644 --- a/dlls/qcap/tests/qcap.c +++ b/dlls/qcap/tests/qcap.c @@ -1232,6 +1232,8 @@ static void test_AviMux(void) IBaseFilter *avimux; IEnumPins *ep; IEnumMediaTypes *emt; + IMemInputPin *memin; + ALLOCATOR_PROPERTIES props; HRESULT hr; init_test_filter(&source_filter, PINDIR_OUTPUT, SOURCE_FILTER); @@ -1336,6 +1338,21 @@ static void test_AviMux(void) CHECK_CALLED(NotifyAllocator); CHECK_CALLED(Reconnect); + hr = IPin_QueryInterface(avimux_in, &IID_IMemInputPin, (void**)&memin); + ok(hr == S_OK, "QueryInterface returned %x\n", hr); + + props.cBuffers = 0xdeadbee1; + props.cbBuffer = 0xdeadbee2; + props.cbAlign = 0xdeadbee3; + props.cbPrefix = 0xdeadbee4; + hr = IMemInputPin_GetAllocatorRequirements(memin, &props); + ok(hr == S_OK, "GetAllocatorRequirments returned %x\n", hr); + ok(props.cBuffers == 0xdeadbee1, "cBuffers = %d\n", props.cBuffers); + ok(props.cbBuffer == 0xdeadbee2, "cbBuffer = %d\n", props.cbBuffer); + ok(props.cbAlign == 1, "cbAlign = %d\n", props.cbAlign); + ok(props.cbPrefix == 8, "cbPrefix = %d\n", props.cbPrefix); + IMemInputPin_Release(memin); + hr = IPin_Disconnect(avimux_out); ok(hr == S_OK, "Disconnect returned %x\n", hr);