This commit is contained in:
Glenn Maynard
2005-10-21 01:45:16 +00:00
parent f77dd38f0f
commit 6ee40039a8
3 changed files with 37 additions and 39 deletions
@@ -91,8 +91,7 @@ static void GetVideoCodecDebugInfo()
LOG->Trace( "Scanning codec %s", FourCCToString(info.fccHandler).c_str() );
CHECKPOINT;
HIC hic;
hic = ICOpen(info.fccType, info.fccHandler, ICMODE_DECOMPRESS);
HIC hic = ICOpen( info.fccType, info.fccHandler, ICMODE_DECOMPRESS );
if( !hic )
{
LOG->Info("Couldn't open video codec %s",
@@ -110,21 +109,17 @@ static void GetVideoCodecDebugInfo()
FourCCToString(info.fccHandler).c_str(), info.szName, info.szDescription );
}
else
LOG->Info("ICGetInfo(%s) failed",
FourCCToString(info.fccHandler).c_str());
LOG->Info( "ICGetInfo(%s) failed", FourCCToString(info.fccHandler).c_str() );
CHECKPOINT;
ICClose(hic);
}
if(!i)
if( i == 0 )
LOG->Info( " None found" );
}
//-----------------------------------------------------------------------------
// MovieTexture_DShow constructor
//-----------------------------------------------------------------------------
MovieTexture_DShow::MovieTexture_DShow( RageTextureID ID ) :
RageMovieTexture( ID ),
buffer_lock( "buffer_lock", 1 ),
@@ -132,10 +127,10 @@ MovieTexture_DShow::MovieTexture_DShow( RageTextureID ID ) :
{
LOG->Trace( "MovieTexture_DShow::MovieTexture_DShow()" );
static bool first = true;
if( first )
static bool bFirst = true;
if( bFirst )
{
first = false;
bFirst = false;
GetVideoCodecDebugInfo();
}
@@ -183,7 +178,8 @@ MovieTexture_DShow::~MovieTexture_DShow()
/* Shut down the graph. We can't call Stop() here, since that will
* call SkipUpdates again, which will deadlock if we call it twice
* in a row. */
if (m_pGB) {
if( m_pGB )
{
LOG->Trace( "MovieTexture_DShow: shutdown" );
LOG->Flush();
CComPtr<IMediaControl> pMC;
@@ -220,7 +216,7 @@ void MovieTexture_DShow::CheckFrame()
CreateTexture();
// DirectShow feeds us in BGR8
RageSurface *fromDShow = CreateSurfaceFrom(
RageSurface *pFromDShow = CreateSurfaceFrom(
m_iSourceWidth, m_iSourceHeight,
24,
0xFF0000,
@@ -229,7 +225,8 @@ void MovieTexture_DShow::CheckFrame()
0x000000,
(uint8_t *) buffer, m_iSourceWidth*3 );
/* Optimization notes:
/*
* Optimization notes:
*
* With D3D, this surface can be anything; it'll convert it on the fly. If
* it happens to exactly match the texture, it'll copy a little faster.
@@ -242,12 +239,12 @@ void MovieTexture_DShow::CheckFrame()
CHECKPOINT;
DISPLAY->UpdateTexture(
m_uTexHandle,
fromDShow,
pFromDShow,
0, 0,
m_iImageWidth, m_iImageHeight );
CHECKPOINT;
delete fromDShow;
delete pFromDShow;
buffer = NULL;
@@ -36,7 +36,6 @@ protected:
char *output;
MovieTexture_DShow* m_pTexture; // the video surface we will copy new frames to
// D3DFORMAT m_TextureFormat; // Texture format
};
#endif
@@ -1,5 +1,7 @@
#ifndef RAGEMOVIETEXTURE_FFMPEG_H
#define RAGEMOVIETEXTURE_FFMPEG_H
/* MovieTexture_FFMpeg - FFMpeg movie renderer. */
#ifndef RAGE_MOVIE_TEXTURE_FFMPEG_H
#define RAGE_MOVIE_TEXTURE_FFMPEG_H
#include "MovieTexture_Generic.h"