mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-20 22:59:59 +01:00
Source replacement and create source with software decoder
This commit is contained in:
@@ -694,15 +694,29 @@ void ImGuiVisitor::visit (MediaSource& s)
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_FOLDER_OPEN, "Show in finder"))
|
||||
SystemToolkit::open(SystemToolkit::path_filename(s.path()));
|
||||
|
||||
ImGui::SetCursorPos(botom);
|
||||
}
|
||||
else {
|
||||
// failed
|
||||
ImGui::SetCursorPos(top);
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_COPY, "Copy message"))
|
||||
ImGui::SetClipboardText(info.str().c_str());
|
||||
info.reset();
|
||||
|
||||
ImGui::SetCursorPos(botom);
|
||||
|
||||
// because sometimes the error comes from gpu decoding
|
||||
if ( Settings::application.render.gpu_decoding )
|
||||
{
|
||||
// offer to reload the source without hardware decoding
|
||||
if ( ImGui::Button( ICON_FA_REDO_ALT " Try again without\nhardware decoding", ImVec2(IMGUI_RIGHT_ALIGN, 0)) ) {
|
||||
// replace current source with one created with a flag forcing software decoding
|
||||
Mixer::manager().replaceSource(Mixer::manager().currentSource(),
|
||||
Mixer::manager().createSourceFile(s.path(), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SetCursorPos(botom);
|
||||
}
|
||||
|
||||
void ImGuiVisitor::visit (SessionFileSource& s)
|
||||
|
||||
Reference in New Issue
Block a user