use CHECKPOINT

This commit is contained in:
Glenn Maynard
2003-08-05 01:32:21 +00:00
parent d87c986b97
commit 8ee7dc93a6
2 changed files with 14 additions and 12 deletions
@@ -11,6 +11,7 @@
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
*/ */
/* XXX register thread */
#pragma comment(lib, "winmm.lib") #pragma comment(lib, "winmm.lib")
// Link with the DirectShow base class libraries // Link with the DirectShow base class libraries
@@ -116,7 +117,7 @@ void MovieTexture_DShow::CheckFrame()
if(buffer == NULL) if(buffer == NULL)
return; return;
VDCHECKPOINT; CHECKPOINT;
/* Just in case we were invalidated: */ /* Just in case we were invalidated: */
CreateTexture(); CreateTexture();
@@ -141,29 +142,29 @@ void MovieTexture_DShow::CheckFrame()
* to do a very slow conversion. Both RGB8 and BGR8 are both (usually) valid * to do a very slow conversion. Both RGB8 and BGR8 are both (usually) valid
* formats. * formats.
*/ */
VDCHECKPOINT; CHECKPOINT;
DISPLAY->UpdateTexture( DISPLAY->UpdateTexture(
m_uTexHandle, m_uTexHandle,
fromDShow, fromDShow,
0, 0, 0, 0,
m_iImageWidth, m_iImageHeight ); m_iImageWidth, m_iImageHeight );
VDCHECKPOINT; CHECKPOINT;
SDL_FreeSurface( fromDShow ); SDL_FreeSurface( fromDShow );
buffer = NULL; buffer = NULL;
VDCHECKPOINT; CHECKPOINT;
/* Start the decoding thread again. */ /* Start the decoding thread again. */
SDL_SemPost(buffer_finished); SDL_SemPost(buffer_finished);
VDCHECKPOINT; CHECKPOINT;
} }
void MovieTexture_DShow::Update(float fDeltaTime) void MovieTexture_DShow::Update(float fDeltaTime)
{ {
VDCHECKPOINT; CHECKPOINT;
// restart the movie if we reach the end // restart the movie if we reach the end
if(m_bLoop) if(m_bLoop)
@@ -178,7 +179,7 @@ void MovieTexture_DShow::Update(float fDeltaTime)
SetPosition(0); SetPosition(0);
} }
VDCHECKPOINT; CHECKPOINT;
CheckFrame(); CheckFrame();
} }
@@ -5,6 +5,7 @@
#include "VideoDriverInfo.h" #include "VideoDriverInfo.h"
#include "../../archutils/Win32/GotoURL.h" #include "../../archutils/Win32/GotoURL.h"
#include "RageThreads.h"
@@ -150,10 +151,10 @@ static void GetVideoCodecDebugInfo()
ICINFO info = { sizeof(ICINFO) }; ICINFO info = { sizeof(ICINFO) };
int i; int i;
LOG->Info("Video codecs:"); LOG->Info("Video codecs:");
VDCHECKPOINT; CHECKPOINT;
for(i=0; ICInfo(ICTYPE_VIDEO, i, &info); ++i) for(i=0; ICInfo(ICTYPE_VIDEO, i, &info); ++i)
{ {
VDCHECKPOINT; CHECKPOINT;
if( FourCCToString(info.fccHandler) == "ASV1" ) if( FourCCToString(info.fccHandler) == "ASV1" )
{ {
/* Broken. */ /* Broken. */
@@ -162,7 +163,7 @@ static void GetVideoCodecDebugInfo()
} }
LOG->Trace( "Scanning codec %s", FourCCToString(info.fccHandler).c_str() ); LOG->Trace( "Scanning codec %s", FourCCToString(info.fccHandler).c_str() );
VDCHECKPOINT; CHECKPOINT;
HIC hic; HIC hic;
hic = ICOpen(info.fccType, info.fccHandler, ICMODE_DECOMPRESS); hic = ICOpen(info.fccType, info.fccHandler, ICMODE_DECOMPRESS);
if(!hic) if(!hic)
@@ -172,7 +173,7 @@ static void GetVideoCodecDebugInfo()
continue; continue;
} }
VDCHECKPOINT; CHECKPOINT;
if (ICGetInfo(hic, &info, sizeof(ICINFO))) if (ICGetInfo(hic, &info, sizeof(ICINFO)))
LOG->Info(" %s: %ls (%ls)", LOG->Info(" %s: %ls (%ls)",
FourCCToString(info.fccHandler).c_str(), info.szName, info.szDescription); FourCCToString(info.fccHandler).c_str(), info.szName, info.szDescription);
@@ -180,7 +181,7 @@ static void GetVideoCodecDebugInfo()
LOG->Info("ICGetInfo(%s) failed", LOG->Info("ICGetInfo(%s) failed",
FourCCToString(info.fccHandler).c_str()); FourCCToString(info.fccHandler).c_str());
VDCHECKPOINT; CHECKPOINT;
ICClose(hic); ICClose(hic);
} }