Add option to wait for transition to complete

This commit is contained in:
WarmUpTill
2021-12-22 22:12:01 +01:00
committed by WarmUpTill
parent 0881146a25
commit a2ba7adc56
5 changed files with 67 additions and 2 deletions

View File

@@ -413,6 +413,7 @@ void SwitcherData::Stop()
cv.notify_all();
abortMacroWait = true;
macroWaitCv.notify_all();
macroTransitionCv.notify_all();
th->wait();
delete th;
th = nullptr;
@@ -551,6 +552,7 @@ void setTranstionEnd()
{
switcher->lastTransitionEndTime =
std::chrono::high_resolution_clock::now();
switcher->macroTransitionCv.notify_all();
}
void setStreamStarting()