Mostly cosmetic. Do away with m_bBackBufferLocked; it's never actually
read. Change from ugly all-caps Windows aliases to more readable lowercase names, etc.
This commit is contained in:
@@ -63,18 +63,16 @@ public:
|
|||||||
HRESULT DoRenderSample(IMediaSample *pMediaSample); // New video sample
|
HRESULT DoRenderSample(IMediaSample *pMediaSample); // New video sample
|
||||||
|
|
||||||
// new methods
|
// new methods
|
||||||
LONG GetVidWidth() const { return m_lVidWidth; }
|
long GetVidWidth() const { return m_lVidWidth; }
|
||||||
LONG GetVidHeight() const { return m_lVidHeight; }
|
long GetVidHeight() const { return m_lVidHeight; }
|
||||||
HRESULT SetRenderTarget( RageMovieTexture* pTexture );
|
HRESULT SetRenderTarget( RageMovieTexture* pTexture );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LONG m_lVidWidth; // Video width
|
// Video width, height, and pitch.
|
||||||
LONG m_lVidHeight; // Video Height
|
long m_lVidWidth, m_lVidHeight, m_lVidPitch;
|
||||||
LONG m_lVidPitch; // Video Pitch
|
|
||||||
|
|
||||||
RageMovieTexture* m_pTexture; // the video surface we will copy new frames to
|
RageMovieTexture* m_pTexture; // the video surface we will copy new frames to
|
||||||
D3DFORMAT m_TextureFormat; // Texture format
|
D3DFORMAT m_TextureFormat; // Texture format
|
||||||
BOOL m_bBackBufferLocked;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +91,6 @@ CTextureRenderer::CTextureRenderer()
|
|||||||
|
|
||||||
// Store and ARageef the texture for our use.
|
// Store and ARageef the texture for our use.
|
||||||
m_pTexture = NULL;
|
m_pTexture = NULL;
|
||||||
m_bBackBufferLocked = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -213,11 +210,9 @@ HRESULT CTextureRenderer::DoRenderSample( IMediaSample * pSample )
|
|||||||
// keep trying until we get the lock
|
// keep trying until we get the lock
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bBackBufferLocked = TRUE;
|
|
||||||
|
|
||||||
// Get the texture buffer & pitch
|
// Get the texture buffer & pitch
|
||||||
BYTE *pTxtBuffer = static_cast<byte *>(d3dlr.pBits);
|
byte *pTxtBuffer = static_cast<byte *>(d3dlr.pBits);
|
||||||
LONG lTxtPitch = d3dlr.Pitch;
|
long lTxtPitch = d3dlr.Pitch;
|
||||||
|
|
||||||
ASSERT( pTxtBuffer != NULL );
|
ASSERT( pTxtBuffer != NULL );
|
||||||
|
|
||||||
@@ -271,6 +266,7 @@ HRESULT CTextureRenderer::DoRenderSample( IMediaSample * pSample )
|
|||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT( m_pTexture != NULL );
|
||||||
|
|
||||||
// Unlock the Texture
|
// Unlock the Texture
|
||||||
if( FAILED( pD3DTextureCopyTo->UnlockRect(0) ) )
|
if( FAILED( pD3DTextureCopyTo->UnlockRect(0) ) )
|
||||||
@@ -279,8 +275,7 @@ HRESULT CTextureRenderer::DoRenderSample( IMediaSample * pSample )
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bBackBufferLocked = FALSE;
|
ASSERT( m_pTexture != NULL );
|
||||||
|
|
||||||
|
|
||||||
// flip active texture
|
// flip active texture
|
||||||
m_pTexture->Flip();
|
m_pTexture->Flip();
|
||||||
|
|||||||
Reference in New Issue
Block a user