Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 25 ++++++++-----------------
- 1 file changed, 8 insertions(+), 17 deletions(-)
- diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- index 7a903ad..7268531 100644
- --- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- +++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- @@ -339,25 +339,16 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
- m_dropbase = 0.0f;
- #endif
- - // DVDPlayer sleeps until m_iSleepEndTime here before calling FlipPage.
- - // 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.
- - // So, we keep track of when FlipPage would have been called on DVDPlayer and return early if it is not time.
- - // m_iSleepEndTime == DVD_NOPTS_VALUE means we are not waiting to call FlipPage, otherwise it is the time we want to call FlipPage
- - if (m_iSleepEndTime == DVD_NOPTS_VALUE) {
- - m_iSleepEndTime = iCurrentClock + iSleepTime;
- - }
- -
- - if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime + DVD_MSEC_TO_TIME(500))
- + int buffer = g_renderManager.WaitForBuffer(m_bStop, 0);
- + if (buffer < 0)
- return;
- - double pts_media = m_av_clock->OMXMediaTime(false);
- - ProcessOverlays(iGroupId, pts_media);
- -
- - g_renderManager.FlipPage(CThread::m_bStop, m_iSleepEndTime / DVD_TIME_BASE, -1, FS_NONE);
- -
- - m_iSleepEndTime = DVD_NOPTS_VALUE;
- + double pts_overlay = m_av_clock->OMXMediaTime(false)
- + + 2 * iFrameDuration;
- + ProcessOverlays(iGroupId, pts_overlay);
- - //m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
- + double timestamp = (CDVDClock::GetAbsoluteClock(false) + 2 * iFrameDuration) / DVD_TIME_BASE;
- + g_renderManager.FlipPage(CThread::m_bStop, timestamp, -1, FS_NONE);
- }
- void OMXPlayerVideo::Process()
- @@ -790,7 +781,7 @@ void OMXPlayerVideo::ResolutionUpdateCallBack(uint32_t width, uint32_t height)
- if(!g_renderManager.Configure(width, height,
- iDisplayWidth, iDisplayHeight, m_fFrameRate, flags, format, 0,
- - m_hints.orientation))
- + m_hints.orientation, true))
- {
- CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
- return;
- --
- 1.8.1.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement