Descriptionppapi: VideoEncoder: improve accuracy of encoding tick
The current VideoEncoder example's scheduling algorithm for encoding frames at
30fps drifts as it schedules new callbacks and as a consequence
records fewer frames than what the frame rate requires.
This change improves the algorithm by storing the last time at which it
encoded a frame and uses this information to predict when the next tick should
happen.
BUG=none
TEST=record 30s of video using the video encoder example, check that the produced stream's length is identical (1 or 2 frames difference)
Committed: https://crrev.com/bfa767842bd01af263ae0681a6748f5458fdfc8d
Cr-Commit-Position: refs/heads/master@{#335147}
Patch Set 1 #
Messages
Total messages: 14 (2 generated)
|