Skip to content

Commit

Permalink
dvdplayer: display pictures skipped on output
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus committed May 31, 2013
1 parent f18a743 commit 00add08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbmc/cores/VideoRenderers/RenderManager.cpp
Expand Up @@ -111,6 +111,7 @@ CXBMCRenderManager::CXBMCRenderManager()
m_QueueSize = 2;
m_QueueRender = 0;
m_QueueOutput = 0;
m_QueueSkip = 0;
}

CXBMCRenderManager::~CXBMCRenderManager()
Expand Down Expand Up @@ -361,13 +362,18 @@ void CXBMCRenderManager::FrameMove()
if(m_presentstep == PRESENT_FLIP)
{
/* release all previous */
int count = 0;
while(m_QueueRender != m_presentsource)
{
m_pRenderer->ReleaseBuffer(m_QueueRender);
m_overlays.Release(m_QueueRender);
m_QueueRender = (m_QueueRender + 1) % m_QueueSize;
count++;
}

if(count > 1)
m_QueueSkip += count - 1;

m_pRenderer->FlipPage(m_presentsource);
m_presentstep = PRESENT_FRAME;
m_presentevent.Set();
Expand Down Expand Up @@ -433,6 +439,7 @@ unsigned int CXBMCRenderManager::PreInit()
m_QueueSize = 2;
m_QueueRender = 0;
m_QueueOutput = 0;
m_QueueSkip = 0;

return m_pRenderer->PreInit();
}
Expand Down
2 changes: 2 additions & 0 deletions xbmc/cores/VideoRenderers/RenderManager.h
Expand Up @@ -123,6 +123,7 @@ class CXBMCRenderManager
float GetMaximumFPS();
inline bool IsStarted() { return m_bIsStarted;}
double GetDisplayLatency() { return m_displayLatency; }
int GetSkippedFrames() { return m_QueueSkip; }

bool Supports(ERENDERFEATURE feature);
bool Supports(EDEINTERLACEMODE method);
Expand Down Expand Up @@ -228,6 +229,7 @@ class CXBMCRenderManager
int m_QueueRender;
int m_QueueOutput;
int m_QueueSize;
int m_QueueSkip;

struct
{
Expand Down
1 change: 1 addition & 0 deletions xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
Expand Up @@ -1539,6 +1539,7 @@ std::string CDVDPlayerVideo::GetPlayerInfo()
s << ", dc:" << m_codecname;
s << ", Mb/s:" << fixed << setprecision(2) << (double)GetVideoBitrate() / (1024.0*1024.0);
s << ", drop:" << m_iDroppedFrames;
s << ", skip:" << g_renderManager.GetSkippedFrames();

int pc = m_pullupCorrection.GetPatternLength();
if (pc > 0)
Expand Down

0 comments on commit 00add08

Please sign in to comment.