stutter fix
Some checks failed
CI / Native Windows Build And Tests (push) Has been cancelled
CI / React UI Build (push) Has been cancelled
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
2026-05-06 11:23:40 +10:00
parent 3cb8d3cfad
commit 2317a80ce5
4 changed files with 78 additions and 4 deletions

View File

@@ -4,7 +4,9 @@
#include <windows.h>
#include <chrono>
#include <functional>
#include <cstdint>
class DeckLinkSession;
class OpenGLRenderer;
@@ -30,6 +32,8 @@ public:
void PlayoutFrameCompleted(IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult completionResult);
private:
void RecordFramePacing(BMDOutputFrameCompletionResult completionResult);
DeckLinkSession& mDeckLink;
OpenGLRenderer& mRenderer;
RuntimeHost& mRuntimeHost;
@@ -38,4 +42,11 @@ private:
HGLRC mHglrc;
RenderEffectCallback mRenderEffect;
PaintCallback mPaint;
std::chrono::steady_clock::time_point mLastPlayoutCompletionTime;
double mCompletionIntervalMilliseconds = 0.0;
double mSmoothedCompletionIntervalMilliseconds = 0.0;
double mMaxCompletionIntervalMilliseconds = 0.0;
uint64_t mLateFrameCount = 0;
uint64_t mDroppedFrameCount = 0;
uint64_t mFlushedFrameCount = 0;
};