[omxplayer] Request to be notified about framerate changes
authorpopcornmix <popcornmix@gmail.com>
Fri, 11 Apr 2014 18:01:26 +0000 (19:01 +0100)
committerpopcornmix <popcornmix@gmail.com>
Tue, 13 May 2014 14:05:31 +0000 (15:05 +0100)
xbmc/cores/omxplayer/OMXVideo.cpp

index 10a7530..e897694 100644 (file)
@@ -559,6 +559,17 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de
     return false;
   }
 
+  // request portsettingschanged on refresh rate change
+  if (CSettings::Get().GetInt("videoplayer.adjustrefreshrate") == ADJUST_REFRESHRATE_ALWAYS)
+  {
+    notifications.nIndex = OMX_IndexParamPortDefinition;
+    omx_err = m_omx_decoder.SetParameter((OMX_INDEXTYPE)OMX_IndexConfigRequestCallback, &notifications);
+    if (omx_err != OMX_ErrorNone)
+    {
+      CLog::Log(LOGERROR, "COMXVideo::Open OMX_IndexConfigRequestCallback error (0%08x)\n", omx_err);
+      //return false;
+    }
+  }
   OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE concanParam;
   OMX_INIT_STRUCTURE(concanParam);
   if(g_advancedSettings.m_omxDecodeStartWithValidFrame)