Trivial simplifications.
This commit is contained in:
@@ -352,10 +352,6 @@ void HandleDivXError()
|
|||||||
HRESULT RageMovieTexture::InitDShowTextureRenderer()
|
HRESULT RageMovieTexture::InitDShowTextureRenderer()
|
||||||
{
|
{
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
CComPtr<IBaseFilter> pFTR; // Texture Renderer Filter
|
|
||||||
CComPtr<IPin> pFTRPinIn; // Texture Renderer Input Pin
|
|
||||||
CComPtr<IBaseFilter> pFSrc; // Source Filter
|
|
||||||
CComPtr<IPin> pFSrcPinOut; // Source Filter Output Pin
|
|
||||||
|
|
||||||
// Create the filter graph
|
// Create the filter graph
|
||||||
if( FAILED( m_pGB.CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC) ) )
|
if( FAILED( m_pGB.CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC) ) )
|
||||||
@@ -367,7 +363,7 @@ HRESULT RageMovieTexture::InitDShowTextureRenderer()
|
|||||||
throw RageException( hr, "Could not create texture renderer object!" );
|
throw RageException( hr, "Could not create texture renderer object!" );
|
||||||
|
|
||||||
// Get a pointer to the IBaseFilter on the TextureRenderer, add it to graph
|
// Get a pointer to the IBaseFilter on the TextureRenderer, add it to graph
|
||||||
pFTR = m_pCTR;
|
CComPtr<IBaseFilter> pFTR = m_pCTR;
|
||||||
if( FAILED( hr = m_pGB->AddFilter(pFTR, L"TEXTURERENDERER" ) ) )
|
if( FAILED( hr = m_pGB->AddFilter(pFTR, L"TEXTURERENDERER" ) ) )
|
||||||
throw RageException( hr, "Could not add renderer filter to graph!" );
|
throw RageException( hr, "Could not add renderer filter to graph!" );
|
||||||
|
|
||||||
@@ -382,6 +378,7 @@ HRESULT RageMovieTexture::InitDShowTextureRenderer()
|
|||||||
|
|
||||||
|
|
||||||
// Add the source filter
|
// Add the source filter
|
||||||
|
CComPtr<IBaseFilter> pFSrc; // Source Filter
|
||||||
if( FAILED( hr = m_pGB->AddSourceFilter( wFileName, L"SOURCE", &pFSrc ) ) ) // if this fails, it's probably because the user doesn't have DivX installed
|
if( FAILED( hr = m_pGB->AddSourceFilter( wFileName, L"SOURCE", &pFSrc ) ) ) // if this fails, it's probably because the user doesn't have DivX installed
|
||||||
{
|
{
|
||||||
HandleDivXError();
|
HandleDivXError();
|
||||||
@@ -389,9 +386,11 @@ HRESULT RageMovieTexture::InitDShowTextureRenderer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the source's output and the renderer's input
|
// Find the source's output and the renderer's input
|
||||||
|
CComPtr<IPin> pFTRPinIn; // Texture Renderer Input Pin
|
||||||
if( FAILED( hr = pFTR->FindPin( L"In", &pFTRPinIn ) ) )
|
if( FAILED( hr = pFTR->FindPin( L"In", &pFTRPinIn ) ) )
|
||||||
throw RageException( hr, "Could not find input pin!" );
|
throw RageException( hr, "Could not find input pin!" );
|
||||||
|
|
||||||
|
CComPtr<IPin> pFSrcPinOut; // Source Filter Output Pin
|
||||||
if( FAILED( hr = pFSrc->FindPin( L"Output", &pFSrcPinOut ) ) )
|
if( FAILED( hr = pFSrc->FindPin( L"Output", &pFSrcPinOut ) ) )
|
||||||
throw RageException( hr, "Could not find output pin!" );
|
throw RageException( hr, "Could not find output pin!" );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user