-
L 主要函数: 代码片段: printf("libpag: processPagFile start.\n"); int actualWidth = pagFile->width(); if (imageWidth > 0) auto totalFrames = TimeToFrame(pagFile->duration(), pagFile->frameRate()); int bytesLength = actualWidth * actualHeight * 4; // check whether dir is exist if (access(outdir.c_str(), 0) == -1) { auto audioData = pagFile->audioBytes(); while (currentFrame <= totalFrames) {
} delete pagPlayer; printf("libpag: processPagFile timeCost:%fs \n", (GetTimer() - startTime) * 1.000f / 1000000); return writeIndex; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
这是个while循环,根本没有实时渲染,不存在丢帧的概念。你注意一下素材的帧率,和浮点误差。应该是计算的progress有偏移导致定位错了帧。用PAGPlayer.nextFrame()会更加准确。 |
Beta Was this translation helpful? Give feedback.
这是个while循环,根本没有实时渲染,不存在丢帧的概念。你注意一下素材的帧率,和浮点误差。应该是计算的progress有偏移导致定位错了帧。用PAGPlayer.nextFrame()会更加准确。