Loading media/libstagefright/VideoFrameScheduler.cpp +4 −2 Original line number Original line Diff line number Diff line Loading @@ -460,6 +460,7 @@ nsecs_t VideoFrameScheduler::schedule(nsecs_t renderTime) { mTimeCorrection -= mVsyncPeriod / 2; mTimeCorrection -= mVsyncPeriod / 2; renderTime -= mVsyncPeriod / 2; renderTime -= mVsyncPeriod / 2; nextVsyncTime -= mVsyncPeriod; nextVsyncTime -= mVsyncPeriod; if (vsyncsForLastFrame > 0) --vsyncsForLastFrame; --vsyncsForLastFrame; } else if (mTimeCorrection < -correctionLimit && } else if (mTimeCorrection < -correctionLimit && (vsyncsPerFrameAreNearlyConstant || vsyncsForLastFrame == minVsyncsPerFrame)) { (vsyncsPerFrameAreNearlyConstant || vsyncsForLastFrame == minVsyncsPerFrame)) { Loading @@ -467,6 +468,7 @@ nsecs_t VideoFrameScheduler::schedule(nsecs_t renderTime) { mTimeCorrection += mVsyncPeriod / 2; mTimeCorrection += mVsyncPeriod / 2; renderTime += mVsyncPeriod / 2; renderTime += mVsyncPeriod / 2; nextVsyncTime += mVsyncPeriod; nextVsyncTime += mVsyncPeriod; if (vsyncsForLastFrame < ULONG_MAX) ++vsyncsForLastFrame; ++vsyncsForLastFrame; } } ATRACE_INT("FRAME_VSYNCS", vsyncsForLastFrame); ATRACE_INT("FRAME_VSYNCS", vsyncsForLastFrame); Loading Loading
media/libstagefright/VideoFrameScheduler.cpp +4 −2 Original line number Original line Diff line number Diff line Loading @@ -460,6 +460,7 @@ nsecs_t VideoFrameScheduler::schedule(nsecs_t renderTime) { mTimeCorrection -= mVsyncPeriod / 2; mTimeCorrection -= mVsyncPeriod / 2; renderTime -= mVsyncPeriod / 2; renderTime -= mVsyncPeriod / 2; nextVsyncTime -= mVsyncPeriod; nextVsyncTime -= mVsyncPeriod; if (vsyncsForLastFrame > 0) --vsyncsForLastFrame; --vsyncsForLastFrame; } else if (mTimeCorrection < -correctionLimit && } else if (mTimeCorrection < -correctionLimit && (vsyncsPerFrameAreNearlyConstant || vsyncsForLastFrame == minVsyncsPerFrame)) { (vsyncsPerFrameAreNearlyConstant || vsyncsForLastFrame == minVsyncsPerFrame)) { Loading @@ -467,6 +468,7 @@ nsecs_t VideoFrameScheduler::schedule(nsecs_t renderTime) { mTimeCorrection += mVsyncPeriod / 2; mTimeCorrection += mVsyncPeriod / 2; renderTime += mVsyncPeriod / 2; renderTime += mVsyncPeriod / 2; nextVsyncTime += mVsyncPeriod; nextVsyncTime += mVsyncPeriod; if (vsyncsForLastFrame < ULONG_MAX) ++vsyncsForLastFrame; ++vsyncsForLastFrame; } } ATRACE_INT("FRAME_VSYNCS", vsyncsForLastFrame); ATRACE_INT("FRAME_VSYNCS", vsyncsForLastFrame); Loading