Commit 05d658d0 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

Added reconnect function for filtergraph.

parent 0caae476
...@@ -473,10 +473,27 @@ static HRESULT WINAPI Graphbuilder_ConnectDirect(IGraphBuilder *iface, ...@@ -473,10 +473,27 @@ static HRESULT WINAPI Graphbuilder_ConnectDirect(IGraphBuilder *iface,
static HRESULT WINAPI Graphbuilder_Reconnect(IGraphBuilder *iface, static HRESULT WINAPI Graphbuilder_Reconnect(IGraphBuilder *iface,
IPin *ppin) { IPin *ppin) {
ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface); ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
IPin *pConnectedTo = NULL;
HRESULT hr;
PIN_DIRECTION pindir;
TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppin); IPin_QueryDirection(ppin, &pindir);
hr = IPin_ConnectedTo(ppin, &pConnectedTo);
return S_OK; if (FAILED(hr)) {
TRACE("Querying connected to failed: %lx\n", hr);
return hr;
}
IPin_Disconnect(ppin);
IPin_Disconnect(pConnectedTo);
if (pindir == PINDIR_INPUT)
hr = IPin_Connect(pConnectedTo, ppin, NULL);
else
hr = IPin_Connect(ppin, pConnectedTo, NULL);
IPin_Release(pConnectedTo);
if (FAILED(hr))
ERR("Reconnecting pins failed, pins are not connected now..\n");
TRACE("(%p->%p) -- %p %p -> %lx\n", iface, This, ppin, pConnectedTo, hr);
return hr;
} }
static HRESULT WINAPI Graphbuilder_Disconnect(IGraphBuilder *iface, static HRESULT WINAPI Graphbuilder_Disconnect(IGraphBuilder *iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment