Drop a frame if the rendering time exceeds the v-sync period

This commit is contained in:
Cameron Gutman
2019-01-20 19:59:29 -08:00
parent d6b4c8e7da
commit c064f87889
2 changed files with 41 additions and 17 deletions
@@ -27,9 +27,12 @@ public:
bool isUsingFrameQueue();
private:
void renderFrame(AVFrame* frame);
QQueue<AVFrame*> m_FrameQueue;
QQueue<int> m_FrameQueueHistory;
SDL_SpinLock m_FrameQueueLock;
bool m_DropNextFrame;
IVsyncSource* m_VsyncSource;
IFFmpegRenderer* m_VsyncRenderer;