WIP Video Player Visualization (Update 21st Oct 2014: v0.1.0)
#29
(2014-10-24, 10:04)zeddymac Wrote: i made it all the way up to me adding the video until i thought about if gominoa ever uploaded that 15sec loop of the fire place which was not so i went to the source & tried to download one when i noticed that any video file i played was playing @ 10x-15x faster (like its feeling in fastforward)
i also added the ffmpeg addon but that didnt work either
I updated this patch a couple days ago. Did you grab it before that? It's the 2 line change below or you can redownload/reapply.

The old code basically said it's ALWAYS time for a new frame. I'm on a Celeron 2957U 1.4GHz and it can only run at ~25ish frames per sec so I didn't notice the problem. What CPU you using? Also, PM me if you want the fireplace video.

Here's the relevant change:
Code:
--- a/xbmc-14.0a4-Helix/xbmc/visualizations/video/video.cpp
+++ b/xbmc-14.0a4-Helix/xbmc/visualizations/video/video.cpp
@@ -165,10 +165,12 @@ extern "C" void Render()
     gettimeofday(&now, NULL);
     double current = (double)now.tv_sec + ((double)now.tv_usec / (double)CLOCKS_PER_SEC);

+    if (m_nextFrameTime == 0.0) m_nextFrameTime = current;
+
     // We're supposed to show m_decoder->getFramesPerSecond() frames in one second.
     if (current >= m_nextFrameTime)
     {  // We don't care to adjust for the exact timing
-       m_nextFrameTime = current + m_secondsPerFrame - (current - m_nextFrameTime);
+       m_nextFrameTime += m_secondsPerFrame;

        while (true)
         {
Reply


Messages In This Thread
RE: Video Player Visualization (Update 21st Oct 2014: v0.1.0) - by gominoa - 2014-10-24, 17:15
Logout Mark Read Team Forum Stats Members Help
Video Player Visualization (Update 21st Oct 2014: v0.1.0)0