diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 4ea45e99256..69366750904 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -261,15 +261,31 @@ static HRESULT WINAPI Graphbuilder_FindFilterByName(IGraphBuilder *iface, return E_FAIL; /* FIXME: check this error code */ } +/* NOTE: despite the implication, it doesn't matter which + * way round you put in the input and output pins */ static HRESULT WINAPI Graphbuilder_ConnectDirect(IGraphBuilder *iface, IPin *ppinIn, IPin *ppinOut, const AM_MEDIA_TYPE *pmt) { + PIN_DIRECTION dir; + HRESULT hr; + ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface); TRACE("(%p/%p)->(%p, %p, %p)\n", This, iface, ppinIn, ppinOut, pmt); - return IPin_Connect(ppinOut, ppinIn, pmt); + /* FIXME: check pins are in graph */ + + hr = IPin_QueryDirection(ppinIn, &dir); + if (SUCCEEDED(hr)) + { + if (dir == PINDIR_INPUT) + hr = IPin_Connect(ppinOut, ppinIn, pmt); + else + hr = IPin_Connect(ppinIn, ppinOut, pmt); + } + + return hr; } static HRESULT WINAPI Graphbuilder_Reconnect(IGraphBuilder *iface, diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index cd183913911..b95e67a5a8d 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -509,6 +509,18 @@ static struct regsvr_coclass const coclass_list[] = { "quartz.dll", "Both" }, + { &CLSID_FilterMapper, + "Filter Mapper", + NULL, + "quartz.dll", + "Both" + }, + { &CLSID_FilterMapper2, + "Filter Mapper 2", + NULL, + "quartz.dll", + "Both" + }, { NULL } /* list terminator */ };