mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-17 13:19:59 +01:00
Mixer re-creates sources after CRITICAL failure that was fixed
Stream sources that fail CRITICAL and are later back to NONE failure can now be re-created and reintegrated in the Mixer
This commit is contained in:
@@ -220,13 +220,13 @@ void Mixer::update()
|
||||
SourceListUnique _failedsources = session_->failedSources();
|
||||
for(auto it = _failedsources.begin(); it != _failedsources.end(); ++it) {
|
||||
|
||||
// intervention depends on the severity of the failure
|
||||
Source::Failure fail = (*it)->failed();
|
||||
|
||||
// only deal with sources that are still attached to mixer
|
||||
if ( attached( *it ) ) {
|
||||
|
||||
// intervention depends on the severity of the failure
|
||||
Source::Failure fail = (*it)->failed();
|
||||
|
||||
// Attempt to repair BAD failed sources
|
||||
// RETRY: Attempt to repair failed sources
|
||||
// (can be automatically repaired without user intervention)
|
||||
if (fail == Source::FAIL_RETRY) {
|
||||
if ( !recreateSource( *it ) ) {
|
||||
@@ -249,6 +249,15 @@ void Mixer::update()
|
||||
// needs refresh after intervention
|
||||
++View::need_deep_update_;
|
||||
}
|
||||
// Source failed, was detached (after FAIL_CRITICAL) and got back to state FAIL_NONE
|
||||
else if ( fail < Source::FAIL_CRITICAL ) {
|
||||
// This looks like we should try to recreate it
|
||||
if ( !recreateSource( *it ) ) {
|
||||
Log::Warning("Source '%s' definitely failed and could not be fixed.", (*it)->name().c_str());
|
||||
// delete failed source if could not recreate it
|
||||
deleteSource( *it );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user