Advertisement
Guest User

patch

a guest
May 3rd, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 25 ++++++++-----------------
  2. 1 file changed, 8 insertions(+), 17 deletions(-)
  3.  
  4. diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  5. index 7a903ad..7268531 100644
  6. --- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  7. +++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  8. @@ -339,25 +339,16 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
  9. m_dropbase = 0.0f;
  10. #endif
  11.  
  12. - // DVDPlayer sleeps until m_iSleepEndTime here before calling FlipPage.
  13. - // Video playback in asynchronous in OMXPlayer, so we don't want to do that here, as it prevents the video fifo from being kept full.
  14. - // So, we keep track of when FlipPage would have been called on DVDPlayer and return early if it is not time.
  15. - // m_iSleepEndTime == DVD_NOPTS_VALUE means we are not waiting to call FlipPage, otherwise it is the time we want to call FlipPage
  16. - if (m_iSleepEndTime == DVD_NOPTS_VALUE) {
  17. - m_iSleepEndTime = iCurrentClock + iSleepTime;
  18. - }
  19. -
  20. - if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime + DVD_MSEC_TO_TIME(500))
  21. + int buffer = g_renderManager.WaitForBuffer(m_bStop, 0);
  22. + if (buffer < 0)
  23. return;
  24.  
  25. - double pts_media = m_av_clock->OMXMediaTime(false);
  26. - ProcessOverlays(iGroupId, pts_media);
  27. -
  28. - g_renderManager.FlipPage(CThread::m_bStop, m_iSleepEndTime / DVD_TIME_BASE, -1, FS_NONE);
  29. -
  30. - m_iSleepEndTime = DVD_NOPTS_VALUE;
  31. + double pts_overlay = m_av_clock->OMXMediaTime(false)
  32. + + 2 * iFrameDuration;
  33. + ProcessOverlays(iGroupId, pts_overlay);
  34.  
  35. - //m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
  36. + double timestamp = (CDVDClock::GetAbsoluteClock(false) + 2 * iFrameDuration) / DVD_TIME_BASE;
  37. + g_renderManager.FlipPage(CThread::m_bStop, timestamp, -1, FS_NONE);
  38. }
  39.  
  40. void OMXPlayerVideo::Process()
  41. @@ -790,7 +781,7 @@ void OMXPlayerVideo::ResolutionUpdateCallBack(uint32_t width, uint32_t height)
  42.  
  43. if(!g_renderManager.Configure(width, height,
  44. iDisplayWidth, iDisplayHeight, m_fFrameRate, flags, format, 0,
  45. - m_hints.orientation))
  46. + m_hints.orientation, true))
  47. {
  48. CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
  49. return;
  50. --
  51. 1.8.1.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement