timing refactor
This commit is contained in:
@@ -32,6 +32,17 @@ VideoIOScheduleTime VideoPlayoutScheduler::NextScheduleTime()
|
||||
return time;
|
||||
}
|
||||
|
||||
void VideoPlayoutScheduler::AlignNextScheduleTimeToPlayback(int64_t streamTime, uint64_t leadFrames)
|
||||
{
|
||||
if (mFrameDuration <= 0 || streamTime < 0)
|
||||
return;
|
||||
|
||||
const uint64_t playbackFrameIndex = static_cast<uint64_t>(streamTime / mFrameDuration);
|
||||
const uint64_t minimumScheduleIndex = playbackFrameIndex + leadFrames;
|
||||
if (minimumScheduleIndex > mScheduledFrameIndex)
|
||||
mScheduledFrameIndex = minimumScheduleIndex;
|
||||
}
|
||||
|
||||
VideoPlayoutRecoveryDecision VideoPlayoutScheduler::AccountForCompletionResult(VideoIOCompletionResult result, uint64_t readyQueueDepth)
|
||||
{
|
||||
++mCompletedFrameIndex;
|
||||
|
||||
Reference in New Issue
Block a user