qcap: Add Avi Mux input pin IMemInputPin::GetAllocator.
This commit is contained in:
parent
0ea378e101
commit
151a3eec9a
|
@ -1346,8 +1346,15 @@ static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocator(
|
|||
{
|
||||
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), ppAllocator);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), ppAllocator);
|
||||
|
||||
if(!ppAllocator)
|
||||
return E_POINTER;
|
||||
|
||||
IMemAllocator_AddRef(avimuxin->pin.pAllocator);
|
||||
*ppAllocator = avimuxin->pin.pAllocator;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI AviMuxIn_MemInputPin_NotifyAllocator(
|
||||
|
@ -1545,6 +1552,13 @@ static HRESULT create_input_pin(AviMux *avimux)
|
|||
avimux->in[avimux->input_pin_no]->IPropertyBag_iface.lpVtbl = &AviMuxIn_PropertyBagVtbl;
|
||||
avimux->in[avimux->input_pin_no]->IQualityControl_iface.lpVtbl = &AviMuxIn_QualityControlVtbl;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IMemAllocator, (void**)&avimux->in[avimux->input_pin_no]->pin.pAllocator);
|
||||
if(FAILED(hr)) {
|
||||
BaseInputPinImpl_Release(&avimux->in[avimux->input_pin_no]->pin.pin.IPin_iface);
|
||||
return hr;
|
||||
}
|
||||
|
||||
avimux->input_pin_no++;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -1234,6 +1234,7 @@ static void test_AviMux(void)
|
|||
IEnumMediaTypes *emt;
|
||||
IMemInputPin *memin;
|
||||
ALLOCATOR_PROPERTIES props;
|
||||
IMemAllocator *memalloc;
|
||||
HRESULT hr;
|
||||
|
||||
init_test_filter(&source_filter, PINDIR_OUTPUT, SOURCE_FILTER);
|
||||
|
@ -1351,6 +1352,21 @@ static void test_AviMux(void)
|
|||
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);
|
||||
|
||||
hr = IMemInputPin_GetAllocator(memin, &memalloc);
|
||||
ok(hr == S_OK, "GetAllocator returned %x\n", hr);
|
||||
|
||||
props.cBuffers = 0xdeadbee1;
|
||||
props.cbBuffer = 0xdeadbee2;
|
||||
props.cbAlign = 0xdeadbee3;
|
||||
props.cbPrefix = 0xdeadbee4;
|
||||
hr = IMemAllocator_GetProperties(memalloc, &props);
|
||||
ok(hr == S_OK, "GetProperties returned %x\n", hr);
|
||||
ok(props.cBuffers == 0, "cBuffers = %d\n", props.cBuffers);
|
||||
ok(props.cbBuffer == 0, "cbBuffer = %d\n", props.cbBuffer);
|
||||
ok(props.cbAlign == 0, "cbAlign = %d\n", props.cbAlign);
|
||||
ok(props.cbPrefix == 0, "cbPrefix = %d\n", props.cbPrefix);
|
||||
IMemAllocator_Release(memalloc);
|
||||
IMemInputPin_Release(memin);
|
||||
|
||||
hr = IPin_Disconnect(avimux_out);
|
||||
|
|
Loading…
Reference in New Issue