[rbp/omxplayer] provide fps hint from pvr demux if available
authorgimli <ebsi4711@gmail.com>
Sat, 15 Dec 2012 07:21:00 +0000 (08:21 +0100)
committergimli <ebsi4711@gmail.com>
Sat, 15 Dec 2012 07:21:00 +0000 (08:21 +0100)
xbmc/cores/omxplayer/OMXPlayer.cpp

index 4bdb6bc..402cca0 100644 (file)
@@ -80,6 +80,7 @@
 #include "pvr/PVRManager.h"
 #include "pvr/channels/PVRChannel.h"
 #include "pvr/windows/GUIWindowPVR.h"
+#include "pvr/addons/PVRClients.h"
 #include "filesystem/PVRFile.h"
 
 #include "utils/StringUtils.h"
@@ -2920,6 +2921,17 @@ bool COMXPlayer::OpenVideoStream(int iStream, int source, bool reset)
     hint.software = true;
   }
 
+  boost::shared_ptr<CPVRClient> client;
+  if(m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER) &&
+     pStream->type == STREAM_VIDEO &&
+     g_PVRClients->GetPlayingClient(client) && client->HandlesDemuxing())
+  {
+    // set the fps in hints
+    const CDemuxStreamVideo *stream = static_cast<const CDemuxStreamVideo*>(pStream);
+    hint.fpsrate  = stream->iFpsRate;
+    hint.fpsscale = stream->iFpsScale;
+  }
+
   CDVDInputStream::IMenus* pMenus = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream);
   if(pMenus && pMenus->IsInMenu())
     hint.stills = true;