What function of input pin is called, when I disconnect pin?
MSDN:
CBasePin::BreakConnect
Remarks
This member function is called when a connection to the pin cannot be made or when CBasePin::Disconnect is called. In this case, it is necessary to undo anything performed during the connection process. You can override this member function to release any references to interfaces that were made during the connection.
But this function is not called. This means, that
CBasePin::Disconnect is not called.
I disconnect pin in Graph edit. I want to delete pin after disconnecting. When i connect pin, i add new pin, to connect additional stream. I saw this in 3dtv.at Stereo Transformation filter. I use function CBasePin::BreakConnect. But, when i disconnect, connect and disconnect pin again, i get exception. The same situation is with mensioned filter. Does it mean, that problem is now in Graph edit? Earlies mensioned filter worked fine.
Here is the code:
HRESULT CTransformerVideoInputPin::BreakConnect(void){
HRESULT hr = CBaseInputPin::BreakConnect();
if (this->IsConnected())
{
m_pVideoTransformerFilter->InputCloseConnection(this);
}
m_pVideoTransformerFilter->InputDelete(this);
return hr;
}
HRESULT CVideoTransformerFilter::InputDelete( CTransformerVideoInputPin* lpIpin )
{
for(std::vector<CTransformerVideoInputPin*>::iterator local_iterator=m_Arrinputpin.begin();local_iterator!=m_Arrinputpin.end();local_iterator++)
{
if (*local_iterator==lpIpin)
{
m_Arrinputpin.erase(local_iterator);
break;
}
}
return S_OK;
}
How can i delete lpIpin?
Everything works, but deleting pin object.