- Fix SIGSEGV in PluginMisc.Keyer by linking Param::SetInstance to instances.
Olive's custom param instances (IntegerInstance, DoubleInstance, etc.) were
not passing the SetInstance pointer to the OpenFX HostSupport base class,
leaving _paramSetInstance as nullptr. When Keyer called paramSetValue during
createInstanceAction, the suite function dereferenced the null pointer in
paramChangedByPlugin(). Now newParam() passes 'this' to every constructor.
- Fix render-thread crash when OFX plugins set params during rendering.
MinOFX calls paramSetValue inside createInstanceAction from the render
thread. SubmitUndoCommand() used to push undo commands directly to
UndoStack, which modifies QAction state (GUI-only). Added IsGuiThread()
check: non-GUI threads execute redo_now() and discard the command without
touching the undo stack.
- Enable PluginMisc.MergeOver and PluginMisc.Keyer integration tests.
MergeOver now supplies both Source and Bg textures; Keyer uses U16 format.
Both pass in the full test suite.
- Make ViewerQueue thread-safe with QMutex around AppendTimewise/PurgeBefore.
Adds copy ctor and assignment to support mutex-per-instance semantics.
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
/*
|
|
* Oak Video Editor - Non-Linear Video Editor
|
|
* Copyright (C) 2025 Olive CE Team
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
|
|
#include "paraminstance.h"
|
|
|
|
#include "OlivePluginInstance.h"
|
|
|
|
namespace olive
|
|
{
|
|
namespace plugin
|
|
{
|
|
void SubmitUndoCommand(const std::shared_ptr<PluginNode> &node,
|
|
UndoCommand *command, const QString &label)
|
|
{
|
|
if (!command) {
|
|
return;
|
|
}
|
|
|
|
if (node) {
|
|
auto *instance = node->getPluginInstance();
|
|
auto *olive_instance =
|
|
dynamic_cast<OlivePluginInstance *>(instance);
|
|
if (olive_instance) {
|
|
olive_instance->SubmitUndoCommand(command, label);
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (!IsGuiThread()) {
|
|
command->redo_now();
|
|
delete command;
|
|
return;
|
|
}
|
|
|
|
Core::instance()->undo_stack()->push(command, label);
|
|
}
|
|
}
|
|
}
|