mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-14 19:59: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();
|
SourceListUnique _failedsources = session_->failedSources();
|
||||||
for(auto it = _failedsources.begin(); it != _failedsources.end(); ++it) {
|
for(auto it = _failedsources.begin(); it != _failedsources.end(); ++it) {
|
||||||
|
|
||||||
// only deal with sources that are still attached to mixer
|
|
||||||
if ( attached( *it ) ) {
|
|
||||||
|
|
||||||
// intervention depends on the severity of the failure
|
// intervention depends on the severity of the failure
|
||||||
Source::Failure fail = (*it)->failed();
|
Source::Failure fail = (*it)->failed();
|
||||||
|
|
||||||
// Attempt to repair BAD failed sources
|
// only deal with sources that are still attached to mixer
|
||||||
|
if ( attached( *it ) ) {
|
||||||
|
|
||||||
|
// RETRY: Attempt to repair failed sources
|
||||||
// (can be automatically repaired without user intervention)
|
// (can be automatically repaired without user intervention)
|
||||||
if (fail == Source::FAIL_RETRY) {
|
if (fail == Source::FAIL_RETRY) {
|
||||||
if ( !recreateSource( *it ) ) {
|
if ( !recreateSource( *it ) ) {
|
||||||
@@ -249,6 +249,15 @@ void Mixer::update()
|
|||||||
// needs refresh after intervention
|
// needs refresh after intervention
|
||||||
++View::need_deep_update_;
|
++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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3638,6 +3638,8 @@ void Navigator::RenderNewPannel()
|
|||||||
ImGui::TextDisabled("Explore online");
|
ImGui::TextDisabled("Explore online");
|
||||||
if (ImGui::Selectable( ICON_FA_EXTERNAL_LINK_ALT " Documentation" ) )
|
if (ImGui::Selectable( ICON_FA_EXTERNAL_LINK_ALT " Documentation" ) )
|
||||||
SystemToolkit::open("https://gstreamer.freedesktop.org/documentation/tools/gst-launch.html?gi-language=c#pipeline-description");
|
SystemToolkit::open("https://gstreamer.freedesktop.org/documentation/tools/gst-launch.html?gi-language=c#pipeline-description");
|
||||||
|
if (ImGui::Selectable( ICON_FA_EXTERNAL_LINK_ALT " Video test source" ) )
|
||||||
|
SystemToolkit::open("https://gstreamer.freedesktop.org/documentation/videotestsrc/index.html?gi-language=c#videotestsrc-page");
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
ImGui::SetCursorPos(pos_bot);
|
ImGui::SetCursorPos(pos_bot);
|
||||||
|
|||||||
Reference in New Issue
Block a user