Mercurial > hg > easaier-soundaccess
diff data/fileio/VideoFileReader.cpp @ 129:587ad94d6ac2
(none)
author | ivand_qmul |
---|---|
date | Thu, 08 Nov 2007 13:29:48 +0000 |
parents | 66af7c1b10d9 |
children | b3df8b8185db |
line wrap: on
line diff
--- a/data/fileio/VideoFileReader.cpp Thu Nov 08 10:50:48 2007 +0000 +++ b/data/fileio/VideoFileReader.cpp Thu Nov 08 13:29:48 2007 +0000 @@ -29,7 +29,10 @@ #include "VideoFileReader.h" - +#ifdef WIN32 +#include <Windows.h> +#endif +long long countFreq; VideoFileReader::VideoFileReader(QString path, bool showProgress, CacheMode mode) : CodedAudioFileReader(mode), m_path(path) @@ -221,7 +224,13 @@ SDL_ffmpegGetVideoSize(film, &w, &h); //SDL_ffmpegStartDecoding(film); SDL_Delay(1000); - + QueryPerformanceFrequency((LARGE_INTEGER *)(&countFreq)); + countFreq/=1000; + film->countFreq=countFreq; + QueryPerformanceCounter((LARGE_INTEGER *)(&film->timer)); + film->timer=film->timer/(film->countFreq); + film->timebase=1; + film->vs[film->videoStream]->lastTimeStamp=0; while( film->videoThreadActive ) { @@ -263,7 +272,7 @@ } // we wish not to kill our poor cpu, so we give it some timeoff - SDL_Delay(10); + // SDL_Delay(1); } // after all is said and done, we should call this SDL_ffmpegFree(film);