Use Pacer to drive all rendering

This commit is contained in:
Cameron Gutman
2018-08-15 23:57:03 -07:00
parent f6a451d6e7
commit 7d61acb2a8
13 changed files with 65 additions and 75 deletions
@@ -4,14 +4,6 @@
#include <QQueue>
class Pacer;
class IVsyncRenderer {
public:
virtual ~IVsyncRenderer() {}
virtual void renderFrameAtVsync(AVFrame* frame) = 0;
};
class IVsyncSource {
public:
virtual ~IVsyncSource() {}
@@ -21,7 +13,7 @@ public:
class Pacer
{
public:
Pacer(IVsyncRenderer* renderer);
Pacer(IFFmpegRenderer* renderer);
~Pacer();
@@ -39,7 +31,7 @@ private:
SDL_SpinLock m_FrameQueueLock;
IVsyncSource* m_VsyncSource;
IVsyncRenderer* m_VsyncRenderer;
IFFmpegRenderer* m_VsyncRenderer;
int m_MaxVideoFps;
int m_DisplayFps;
};