mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-18 02:22:52 +00:00
30 lines
422 B
C++
30 lines
422 B
C++
#pragma once
|
|
|
|
#include "renderer.h"
|
|
|
|
#include <QQueue>
|
|
|
|
class Pacer
|
|
{
|
|
public:
|
|
Pacer();
|
|
|
|
~Pacer();
|
|
|
|
AVFrame* getFrameAtVsync();
|
|
|
|
void submitFrame(AVFrame* frame);
|
|
|
|
void initialize(SDL_Window* window, int maxVideoFps);
|
|
|
|
void drain();
|
|
|
|
private:
|
|
QQueue<AVFrame*> m_FrameQueue;
|
|
QQueue<int> m_FrameQueueHistory;
|
|
SDL_SpinLock m_FrameQueueLock;
|
|
|
|
int m_MaxVideoFps;
|
|
int m_DisplayFps;
|
|
};
|