[Deinterlace-checkins] SF.net SVN: deinterlace:[4730] trunk/DScaler/DScaler/dshowsource/DSGraph. cp
Brought to you by:
adcockj,
dschmelzer
From: <ad...@us...> - 2009-08-20 14:36:40
|
Revision: 4730 http://deinterlace.svn.sourceforge.net/deinterlace/?rev=4730&view=rev Author: adcockj Date: 2009-08-20 14:36:34 +0000 (Thu, 20 Aug 2009) Log Message: ----------- Allow for graphs where smart tee gets inserted so we can't assume that renderer is connected to the capture filter Modified Paths: -------------- trunk/DScaler/DScaler/dshowsource/DSGraph.cpp Modified: trunk/DScaler/DScaler/dshowsource/DSGraph.cpp =================================================================== --- trunk/DScaler/DScaler/dshowsource/DSGraph.cpp 2009-08-20 14:35:44 UTC (rev 4729) +++ trunk/DScaler/DScaler/dshowsource/DSGraph.cpp 2009-08-20 14:36:34 UTC (rev 4730) @@ -489,11 +489,16 @@ } //get IAMStreamConfig on the output pin - m_pStreamCfg=NULL; - hr=OutPin.QueryInterface(&m_pStreamCfg); - if(FAILED(hr)) + if(m_pStreamCfg==NULL) { - throw CDShowException("Query interface for IAMStreamConfig failed",hr); + try + { + FindStreamConfig(); + } + catch(CDShowException&) + { + return ERROR_FAILED_TO_CHANGE_BACK; + } } FILTER_STATE oldState=getState(); @@ -795,6 +800,18 @@ } void CDShowGraph::FindStreamConfig() { + if(m_pBuilder) + { + // use FindInterface if we can + m_pStreamCfg=NULL; + HRESULT hr = m_pBuilder->FindInterface(&LOOK_UPSTREAM_ONLY, NULL, m_renderer, IID_IAMStreamConfig, (void**)&m_pStreamCfg); + if(FAILED(hr)) + { + throw CDShowException("Query interface for IAMStreamConfig failed",hr); + } + return; + } + CDShowPinEnum rendPins(m_renderer,PINDIR_INPUT); CComPtr<IPin> inPin; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |