xbmc/xbmc — pull request #1352 by Voyager-xbmc (2012-09-02 06:34:11+00:00)
Title: Set system timer precision back to 1ms - post getting rid of SDL fix

Ever since SDL was finally removed (June 6th 2012) video playback suffers from fluctuating fps. The root cause is to be found in the timer precision. I analysed the SDL_StartTicks function. The only thing it does is setting Windows-wide timer precision to 1 ms, by calling timeBeginPeriod(1);
I added just that line, and it has the same effect, so problem solved. The actual effect is on the timeGetTime() Windows function, which is used in our XbmcThreads::SystemClockMillis(). Without initialisation, the precision can be as bad as 5 ms, or worse, see Microsoft doc at http://msdn.microsoft.com/en-us/library/windows/desktop/dd757629(v=vs.85).aspx
Some people see this more severely than others, because the precision is system-dependent.

Of course increasing timer precision to 1ms may potentially comes at the expense of reduced overall system performance, but it's ok IMO for an HTPC.