示例#1
0
 public override TimeSpan getCurrentTime()
 {
     if (presentationStart.HasValue)
     {
         TimeSpan now = LibC.gettime(eClock.Monotonic);
         return(now - presentationStart.Value);
     }
     return(TimeSpan.Zero);
 }
示例#2
0
        protected override bool onVideoStreamTick(TimeSpan pendingVideoFrame)
        {
            if (m_paused)
            {
                return(false);
            }

            if (presentationStart.HasValue)
            {
                TimeSpan now = LibC.gettime(eClock.Monotonic);
                if (presentationStart.Value + pendingVideoFrame > now)
                {
                    // The first of the pending frames should be rendered in the future, as measured with eClock.Monotonic OS clock.
                    return(false);
                }
            }
            else
            {
                presentationStart = LibC.gettime(eClock.Monotonic) - pendingVideoFrame;
            }
            return(true);
        }