[cscore] Sink: add ability to get most recent frame instead of waiting (#7572)

This allows more control over frame dropping.
This commit is contained in:
Matt
2024-12-28 23:44:48 -05:00
committed by GitHub
parent 85507a6c65
commit a27df8ec24
7 changed files with 117 additions and 6 deletions

View File

@@ -98,7 +98,8 @@ class SourceImpl : public PropertyContainer {
// Blocking function that waits for the next frame and returns it (with
// timeout in seconds). If timeout expires, returns empty frame.
Frame GetNextFrame(double timeout);
// If lastFrameTime==0, uses m_frame.GetTime() for lastFrameTime
Frame GetNextFrame(double timeout, Frame::Time lastFrameTime = 0);
// Force a wakeup of all GetNextFrame() callers by sending an empty frame.
void Wakeup();