mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 00:31:31 +00:00
[obs] scheduler: release ownership when source is idle
Renew frame scheduling only while the source is active and OBS is delivering video ticks. Release ownership after deactivation or a stale tick stream. Reacquire with a new generation and an immediate frame when ticking resumes.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
typedef struct LGFrameScheduler
|
||||
{
|
||||
bool supported;
|
||||
bool sourceActive;
|
||||
bool active;
|
||||
bool resetPending;
|
||||
bool immediatePending;
|
||||
@@ -37,6 +38,7 @@ typedef struct LGFrameScheduler
|
||||
uint32_t generation;
|
||||
uint64_t period;
|
||||
uint64_t lastSend;
|
||||
uint64_t lastTick;
|
||||
|
||||
int64_t phaseError;
|
||||
uint32_t feedbackFrameSerial;
|
||||
@@ -54,8 +56,9 @@ LGFrameScheduler;
|
||||
|
||||
void lgFrameSchedulerInit(LGFrameScheduler * scheduler, bool supported,
|
||||
uint32_t clientID);
|
||||
void lgFrameSchedulerSetActive(LGFrameScheduler * scheduler, bool active);
|
||||
void lgFrameSchedulerSetPeriod(LGFrameScheduler * scheduler,
|
||||
uint64_t period);
|
||||
uint64_t period, uint64_t tickTime);
|
||||
void lgFrameSchedulerRequestImmediate(LGFrameScheduler * scheduler);
|
||||
void lgFrameSchedulerObserveFrame(LGFrameScheduler * scheduler,
|
||||
uint32_t frameSerial, uint32_t generation, uint32_t scheduleEpoch,
|
||||
|
||||
Reference in New Issue
Block a user