Clock updates

This commit is contained in:
Aiden
2026-05-12 21:44:26 +10:00
parent 5c66cfdc64
commit 3a83d9617f
9 changed files with 131 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ struct InputFrameMailboxConfig
VideoIOPixelFormat pixelFormat = VideoIOPixelFormat::Bgra8;
unsigned rowBytes = 0;
std::size_t capacity = 0;
std::size_t maxReadyFrames = 0;
};
struct InputFrame
@@ -64,6 +65,7 @@ public:
bool SubmitFrame(const void* bytes, unsigned rowBytes, uint64_t frameIndex);
bool TryAcquireLatest(InputFrame& frame);
bool TryAcquireOldest(InputFrame& frame);
bool Release(const InputFrame& frame);
void Clear();
InputFrameMailboxMetrics Metrics() const;
@@ -80,6 +82,7 @@ private:
bool IsValidLocked(const InputFrame& frame) const;
void FillFrameLocked(std::size_t index, InputFrame& frame) const;
bool DropOldestReadyLocked();
void TrimReadyFramesLocked();
std::size_t FrameByteCount() const;
mutable std::mutex mMutex;