diff --git a/.clang-tidy b/.clang-tidy
deleted file mode 100644
index fd8c681c4..000000000
--- a/.clang-tidy
+++ /dev/null
@@ -1,147 +0,0 @@
-# Generated from CLion Inspection settings
----
-Checks: '-*,
-bugprone-argument-comment,
-bugprone-assert-side-effect,
-bugprone-bad-signal-to-kill-thread,
-bugprone-branch-clone,
-bugprone-copy-constructor-init,
-bugprone-dangling-handle,
-bugprone-dynamic-static-initializers,
-bugprone-fold-init-type,
-bugprone-forward-declaration-namespace,
-bugprone-forwarding-reference-overload,
-bugprone-inaccurate-erase,
-bugprone-incorrect-roundings,
-bugprone-integer-division,
-bugprone-lambda-function-name,
-bugprone-macro-parentheses,
-bugprone-macro-repeated-side-effects,
-bugprone-misplaced-operator-in-strlen-in-alloc,
-bugprone-misplaced-pointer-arithmetic-in-alloc,
-bugprone-misplaced-widening-cast,
-bugprone-move-forwarding-reference,
-bugprone-multiple-statement-macro,
-bugprone-no-escape,
-bugprone-parent-virtual-call,
-bugprone-posix-return,
-bugprone-reserved-identifier,
-bugprone-sizeof-container,
-bugprone-sizeof-expression,
-bugprone-spuriously-wake-up-functions,
-bugprone-string-constructor,
-bugprone-string-integer-assignment,
-bugprone-string-literal-with-embedded-nul,
-bugprone-suspicious-enum-usage,
-bugprone-suspicious-include,
-bugprone-suspicious-memset-usage,
-bugprone-suspicious-missing-comma,
-bugprone-suspicious-semicolon,
-bugprone-suspicious-string-compare,
-bugprone-suspicious-memory-comparison,
-bugprone-suspicious-realloc-usage,
-bugprone-swapped-arguments,
-bugprone-terminating-continue,
-bugprone-throw-keyword-missing,
-bugprone-too-small-loop-variable,
-bugprone-undefined-memory-manipulation,
-bugprone-undelegated-constructor,
-bugprone-unhandled-self-assignment,
-bugprone-unused-raii,
-bugprone-unused-return-value,
-bugprone-use-after-move,
-bugprone-virtual-near-miss,
-cert-dcl21-cpp,
-cert-dcl58-cpp,
-cert-err34-c,
-cert-err52-cpp,
-cert-err60-cpp,
-cert-flp30-c,
-cert-msc50-cpp,
-cert-msc51-cpp,
-cert-str34-c,
-cppcoreguidelines-interfaces-global-init,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-slicing,
-google-default-arguments,
-google-explicit-constructor,
-google-runtime-operator,
-hicpp-exception-baseclass,
-hicpp-multiway-paths-covered,
-misc-misplaced-const,
-misc-new-delete-overloads,
-misc-no-recursion,
-misc-non-copyable-objects,
-misc-throw-by-value-catch-by-reference,
-misc-unconventional-assign-operator,
-misc-uniqueptr-reset-release,
-modernize-avoid-bind,
-modernize-concat-nested-namespaces,
-modernize-deprecated-headers,
-modernize-deprecated-ios-base-aliases,
-modernize-loop-convert,
-modernize-make-shared,
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-redundant-void-arg,
-modernize-replace-auto-ptr,
-modernize-replace-disallow-copy-and-assign-macro,
-modernize-replace-random-shuffle,
-modernize-return-braced-init-list,
-modernize-shrink-to-fit,
-modernize-unary-static-assert,
-modernize-use-auto,
-modernize-use-bool-literals,
-modernize-use-emplace,
-modernize-use-equals-default,
-modernize-use-equals-delete,
-modernize-use-nodiscard,
-modernize-use-noexcept,
-modernize-use-nullptr,
-modernize-use-override,
-modernize-use-transparent-functors,
-modernize-use-uncaught-exceptions,
-mpi-buffer-deref,
-mpi-type-mismatch,
-openmp-use-default-none,
-performance-faster-string-find,
-performance-for-range-copy,
-performance-implicit-conversion-in-loop,
-performance-inefficient-algorithm,
-performance-inefficient-string-concatenation,
-performance-inefficient-vector-operation,
-performance-move-const-arg,
-performance-move-constructor-init,
-performance-no-automatic-move,
-performance-noexcept-move-constructor,
-performance-trivially-destructible,
-performance-type-promotion-in-math-fn,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param,
-portability-simd-intrinsics,
-readability-avoid-const-params-in-decls,
-readability-const-return-type,
-readability-container-size-empty,
-readability-convert-member-functions-to-static,
-readability-delete-null-pointer,
-readability-deleted-default,
-readability-inconsistent-declaration-parameter-name,
-readability-make-member-function-const,
-readability-misleading-indentation,
-readability-misplaced-array-index,
-readability-non-const-parameter,
-readability-redundant-control-flow,
-readability-redundant-declaration,
-readability-redundant-function-ptr-dereference,
-readability-redundant-smartptr-get,
-readability-redundant-string-cstr,
-readability-redundant-string-init,
-readability-simplify-subscript-expr,
-readability-static-accessed-through-instance,
-readability-static-definition-in-anonymous-namespace,
-readability-string-compare,
-readability-uniqueptr-delete-release,
-readability-use-anyofallof'
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index a21cddf06..920df8e17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
# CMake artifacts
/build*/
-
+build
# Doxygen
/docs/
diff --git a/.gitmodules b/.gitmodules
index 426466e0c..cd2150bf4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,10 +1,6 @@
-[submodule "ext/core"]
+[submodule "ext/core"]README
path = ext/core
url = https://github.com/olive-editor/core
[submodule "ext/KDDockWidgets"]
path = ext/KDDockWidgets
url = https://github.com/olive-editor/KDDockWidgets.git
-[submodule "third_party/openfx"]
- path = third_party/openfx
- url = https://github.com/AcademySoftwareFoundation/openfx.git
- branch = main
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 303939381..6de42b934 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,10 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.30 FATAL_ERROR)
project(olive-editor VERSION 0.2.0 LANGUAGES CXX)
+set(CMAKE_CXX_STANDARD 23)
+
+set(CMAKE_CXX_SCAN_FOR_MODULES ON)
+set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD ON)
+find_package(expat REQUIRED)
+
option(BUILD_QT6 "Build with Qt 6 over 5 (experimental)" ON)
option(BUILD_DOXYGEN "Build Doxygen documentation" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
@@ -31,10 +37,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
+
# Generates a compile_commands.json in the build dir, link that to the repo
# root to enrich your IDE with clangd language server protocol functionalities
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-
+add_subdirectory(third_party/openfx/HostSupport)
# Sanitizers
add_library(olive-sanitizers INTERFACE)
include(cmake/Sanitizers.cmake)
@@ -168,7 +175,7 @@ list(APPEND OLIVE_LIBRARIES
)
# Link FFmpeg
-find_package(FFMPEG 3.0 REQUIRED
+find_package(FFMPEG 7.0 REQUIRED
COMPONENTS
avutil
avcodec
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index c0f4eb917..3776f5be6 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -18,7 +18,6 @@
set(OLIVE_SOURCES
core.h
core.cpp
- pluginSupport/DrawSuite.cpp
)
#set(OLIVE_RESOURCES)
@@ -33,7 +32,6 @@ add_subdirectory(dialog)
add_subdirectory(node)
add_subdirectory(packaging)
add_subdirectory(panel)
-add_subdirectory(pluginSupport)
add_subdirectory(render)
add_subdirectory(shaders)
add_subdirectory(task)
@@ -75,8 +73,10 @@ add_library(libolive-editor
${OLIVE_SOURCES}
${OLIVE_RESOURCES}
)
-
-target_include_directories(libolive-editor PUBLIC ../third_party/openfx/include)
+add_subdirectory(pluginSupport)
+target_compile_features(libolive-editor PUBLIC cxx_std_23)
+include_directories(../third_party/openfx/include
+ ../third_party/openfx/HostSupport/include)
# Remove prefix - prevents CMake calling it "liblibolive-editor"
set_target_properties(libolive-editor PROPERTIES PREFIX "")
@@ -86,7 +86,8 @@ add_executable(olive-editor
$
$
)
-
+target_include_directories(olive-editor PUBLIC pluginSupport)
+target_link_libraries(olive-editor PUBLIC OfxHost)
# Create docs if doxygen was found
if(DOXYGEN_FOUND)
set(DOXYGEN_PROJECT_NAME "Olive")
diff --git a/app/main.cpp b/app/main.cpp
index f6f77813e..90f5e28a2 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -52,7 +52,7 @@ extern "C" {
#ifdef USE_CRASHPAD
#include "common/crashpadinterface.h"
#endif // USE_CRASHPAD
-
+#include "OlivePlugin.cpp"
int decompress_project(const QString &project)
{
if (project.isEmpty()) {
@@ -214,6 +214,11 @@ int main(int argc, char *argv[])
QStringLiteral("project"),
QCoreApplication::translate("main", "Project to open on startup"));
+ auto no_plugin = parser.AddOption(
+ { QStringLiteral("-no-plugin") },
+ QCoreApplication::translate("main", "Don't load plugins")
+ );
+
// Qt options re-implemented (add to this as necessary)
//
// Because we don't use QCommandLineParser, we must filter out Qt's arguments ourselves. Here,
@@ -280,6 +285,10 @@ int main(int argc, char *argv[])
}
}
+ if (!no_plugin->IsSet()) {
+ olive::plugin::loadPlugins("plugins");
+ }
+
if (crash_option->IsSet()) {
startup_params.set_crash_on_startup(true);
}
diff --git a/app/node/plugins/Plugin.h b/app/node/plugins/Plugin.h
index 6133def42..457a0ece8 100644
--- a/app/node/plugins/Plugin.h
+++ b/app/node/plugins/Plugin.h
@@ -20,7 +20,7 @@
#define PLUGIN_NODES_H
#include "node/node.h"
#include "pluginSupport/Plugin.h"
-#include "pluginSupport/OlivePlugin.h"
+#include "pluginSupport/OlivePlugin.cpp"
namespace olive
{
namespace plugin
diff --git a/app/pluginSupport/CMakeLists.txt b/app/pluginSupport/CMakeLists.txt
index 4ef75de73..19b62b0f8 100644
--- a/app/pluginSupport/CMakeLists.txt
+++ b/app/pluginSupport/CMakeLists.txt
@@ -1,22 +1,6 @@
-set(OLIVE_SOURCES
- ${OLIVE_SOURCES}
- pluginSupport/OlivePlugin.h
- pluginSupport/OlivePlugin.cpp
- pluginSupport/Dialog.cpp
- pluginSupport/Core.cpp
- pluginSupport/DrawSuite.cpp
- pluginSupport/GpuRender.cpp
- pluginSupport/ImageEffect.cpp
- pluginSupport/Interact.cpp
- pluginSupport/KeySyms.cpp
- pluginSupport/Memory.cpp
- pluginSupport/MultiThread.cpp
- pluginSupport/OpenGLRender.cpp
- pluginSupport/Param.cpp
- pluginSupport/ParametricParam.cpp
- pluginSupport/Pixels.cpp
- pluginSupport/Progress.cpp
- pluginSupport/Property.cpp
- pluginSupport/TimeLine.cpp
- PARENT_SCOPE
+target_sources(libolive-editor PRIVATE
+ OliveHost.h
+ OliveHost.cpp
+ OliveInstance.h
+ OliveInstance.cpp
)
\ No newline at end of file
diff --git a/app/pluginSupport/Core.cpp b/app/pluginSupport/Core.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Core.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Dialog.cpp b/app/pluginSupport/Dialog.cpp
deleted file mode 100644
index 5a37fd612..000000000
--- a/app/pluginSupport/Dialog.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
-
-#include
-#include
-
-OfxStatus NotifyRedrawPending()
-{
- return kOfxStatReplyDefault;
-}
diff --git a/app/pluginSupport/DrawSuite.cpp b/app/pluginSupport/DrawSuite.cpp
deleted file mode 100644
index 0116ea858..000000000
--- a/app/pluginSupport/DrawSuite.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
-
-#include "DrawSuite.h"
diff --git a/app/pluginSupport/GpuRender.cpp b/app/pluginSupport/GpuRender.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/GpuRender.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/ImageEffect.cpp b/app/pluginSupport/ImageEffect.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/ImageEffect.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Interact.cpp b/app/pluginSupport/Interact.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Interact.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/KeySyms.cpp b/app/pluginSupport/KeySyms.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/KeySyms.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Memory.cpp b/app/pluginSupport/Memory.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Memory.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Message.cpp b/app/pluginSupport/Message.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Message.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/MultiThread.cpp b/app/pluginSupport/MultiThread.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/MultiThread.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/OliveHost.cpp b/app/pluginSupport/OliveHost.cpp
new file mode 100644
index 000000000..8477cb4fd
--- /dev/null
+++ b/app/pluginSupport/OliveHost.cpp
@@ -0,0 +1,85 @@
+/*
+ * Olive Community Edition - 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 .
+ */
+
+#include "node/project.h"
+#include "ofxhImageEffect.h"
+#include
+#include
+#include
+
+#include
+#include
+#include "OliveHost.h"
+using namespace OFX::Host;
+using namespace olive::plugin;
+void loadPlugins(QString path)
+{
+ QDir dir=(QCoreApplication::applicationDirPath()+path);
+ QFileInfoList files=dir.entryInfoList();
+ for (auto& file:files) {
+ if (file.isDir()) {
+ OFX::Binary binary(file.absoluteFilePath().toStdString());
+
+ }
+ }
+}
+
+OliveHost::~OliveHost()
+{
+ for(auto& descriptor:descriptors_){
+ delete descriptor;
+ descriptor=nullptr;
+ }
+ for(auto& instance:instances_){
+ delete instance;
+ instance=nullptr;
+ }
+
+}
+ImageEffect::Descriptor *
+OliveHost::makeDescriptor(ImageEffect::ImageEffectPlugin* plugin)
+{
+ ImageEffect::Descriptor* desc = new ImageEffect::Descriptor(plugin);
+ descriptors_.append(desc);
+ return desc;
+}
+ImageEffect::Descriptor *
+OliveHost::makeDescriptor(const ImageEffect::Descriptor &rootContext,
+ ImageEffect::ImageEffectPlugin *plugin)
+{
+ ImageEffect::Descriptor* desc = new ImageEffect::Descriptor(rootContext,plugin);
+ descriptors_.append(desc);
+ return desc;
+}
+ImageEffect::Descriptor *
+OliveHost::makeDescriptor(const std::string &bundlePath,
+ ImageEffect::ImageEffectPlugin *plugin)
+{
+ ImageEffect::Descriptor* desc = new ImageEffect::Descriptor(bundlePath, plugin);
+ descriptors_.append(desc);
+ return desc;
+}
+
+OFX::Host::ImageEffect::Instance* OliveHost::newInstance(void* clientData,
+ OFX::Host::ImageEffect::ImageEffectPlugin* plugin,
+ OFX::Host::ImageEffect::Descriptor& desc,
+ const std::string& context){
+ //ImageEffect::Instance* instance=new ImageEffect::Instance(clientData,plugin,desc,context);
+ instances_.append(instance);
+ return instance;
+};
diff --git a/app/pluginSupport/OliveHost.h b/app/pluginSupport/OliveHost.h
new file mode 100644
index 000000000..f0d39d633
--- /dev/null
+++ b/app/pluginSupport/OliveHost.h
@@ -0,0 +1,69 @@
+/*
+ * Olive Community Edition - 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 .
+ */
+#include "ofxhHost.h"
+#include "ofxhImageEffectAPI.h"
+#include "ofxCore.h"
+#include "ofxhImageEffect.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+namespace olive {
+namespace plugin {
+
+
+void loadPlugins(QString path);
+class OliveHost: public OFX::Host::ImageEffect::Host{
+public:
+ OliveHost()=default;
+ ~OliveHost() override;
+
+ bool pluginSupported(OFX::Host::ImageEffect::ImageEffectPlugin *plugin,
+ std::string &reason) const override
+ {
+ return true;
+ };
+
+ OFX::Host::ImageEffect::Instance* newInstance(void* clientData,
+ OFX::Host::ImageEffect::ImageEffectPlugin* plugin,
+ OFX::Host::ImageEffect::Descriptor& desc,
+ const std::string& context) override;
+
+
+ OFX::Host::ImageEffect::Descriptor *makeDescriptor(
+ OFX::Host::ImageEffect::ImageEffectPlugin* plugin) override;
+
+ OFX::Host::ImageEffect::Descriptor *makeDescriptor(
+ const OFX::Host::ImageEffect::Descriptor &rootContext,
+ OFX::Host::ImageEffect::ImageEffectPlugin *plugin) override;
+
+ OFX::Host::ImageEffect::Descriptor *makeDescriptor(
+ const std::string &bundlePath,
+ OFX::Host::ImageEffect::ImageEffectPlugin *plugin) override;
+
+private:
+ QList descriptors_;
+ QList instances_;
+};
+}
+}
\ No newline at end of file
diff --git a/app/pluginSupport/OliveInstance.cpp b/app/pluginSupport/OliveInstance.cpp
new file mode 100644
index 000000000..bac1cd081
--- /dev/null
+++ b/app/pluginSupport/OliveInstance.cpp
@@ -0,0 +1,64 @@
+/*
+ * Olive Community Edition - 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 .
+ */
+#include "OliveInstance.h"
+#include "ofxCore.h"
+#include "ofxMessage.h"
+#include
+#include
+#include
+#include
+#include
+namespace olive{
+namespace plugin {
+OfxStatus OliveInstance::vmessage(const char* type,
+ const char* id,
+ const char* format,
+ va_list args){
+
+ char *buffer=new char[1024];
+
+ memset(buffer, 0, 1024*sizeof(char));
+ vsprintf(buffer, format, args);
+
+ QString message(buffer);
+
+ delete [] buffer;
+
+ if(strncmp(type, kOfxMessageQuestion, strlen(kOfxMessageQuestion))){
+
+ auto ret= QMessageBox::information(nullptr,
+ "", message,
+ QMessageBox::Ok, QMessageBox::Cancel);
+
+ if(ret==QMessageBox::Ok){
+ return kOfxStatReplyYes;
+ }
+ else {
+ return kOfxStatReplyNo;
+ }
+
+ }
+ else{
+ QMessageBox::information(nullptr,
+ "", message);
+ return kOfxStatOK;
+ }
+}
+
+}
+}
diff --git a/app/pluginSupport/OliveInstance.h b/app/pluginSupport/OliveInstance.h
new file mode 100644
index 000000000..6522efa6d
--- /dev/null
+++ b/app/pluginSupport/OliveInstance.h
@@ -0,0 +1,58 @@
+/*
+ * Olive Community Edition - 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 .
+ */
+
+#include "ofxImageEffect.h"
+#include "ofxhImageEffect.h"
+namespace olive {
+namespace plugin{
+class OliveInstance : public OFX::Host::ImageEffect::Instance {
+public:
+ OliveInstance(
+ OFX::Host::ImageEffect::ImageEffectPlugin* plugin,
+ OFX::Host::ImageEffect::Descriptor& desc,
+ const std::string& context,
+ bool interactive)
+ : OFX::Host::ImageEffect::Instance(plugin, desc, context, interactive)
+ {
+ }
+ ~OliveInstance() override = default;
+ virtual const std::string &getDefaultOutputFielding() const{
+ return kOfxImageFieldNone;
+ };
+
+ OFX::Host::ImageEffect::ClipInstance *newClipInstance(
+ OFX::Host::ImageEffect::Instance *plugin,
+ OFX::Host::ImageEffect::ClipDescriptor *descriptor,
+ int index) override;
+
+ OfxStatus vmessage(const char* type,
+ const char* id,
+ const char* format,
+ va_list args) override;
+
+ OfxStatus setPersistentMessage(const char* type,
+ const char* id,
+ const char* format,
+ va_list args) override;
+
+ OfxStatus clearPersistentMessage() override;
+
+
+};
+}
+}
\ No newline at end of file
diff --git a/app/pluginSupport/OlivePlugin.cpp b/app/pluginSupport/OlivePlugin.cpp
deleted file mode 100644
index 8395979f4..000000000
--- a/app/pluginSupport/OlivePlugin.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
-#include "OlivePlugin.h"
-
-#include
-olive::plugin::OlivePlugin::~OlivePlugin()
-{
- for (void *p:mems) {
- free(p);
- }
-}
-OfxStatus olive::plugin::OlivePlugin::getProp(QString key, int index,
- char **str)
-{
- *str=nullptr;
- if (stringProps.contains(key)) {
- if (stringProps[key].count()>index) {
- *str=stringProps[key][index];
- return kOfxStatOK;
- }
- return kOfxStatErrBadIndex;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getPropN(QString key,
- char ***str)
-{
- *str=nullptr;
- if (stringProps.contains(key)) {
- *str=stringProps[key].data();
- return kOfxStatOK;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getProp(QString key, int index,
- void **str)
-{
- *str=nullptr;
- if (pointerProps.contains(key)) {
- if (pointerProps[key].count()>index) {
- *str=pointerProps[key][index];
- return kOfxStatOK;
- }
- return kOfxStatErrBadIndex;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getPropN(QString key,
- void ***p)
-{
- *p=nullptr;
- if (pointerProps.contains(key)) {
- *p=pointerProps[key].data();
- return kOfxStatOK;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getProp(QString key, int index,
- int* p)
-{
- *p=0;
- if (intProps.contains(key)) {
- if (intProps[key].count()>index) {
- *p=intProps[key][index];
- return kOfxStatOK;
- }
- return kOfxStatErrBadIndex;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getPropN(QString key,
- int **p)
-{
- *p=nullptr;
- if (intProps.contains(key)) {
- *p=intProps[key].data();
- return kOfxStatOK;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getProp(QString key, int index,
- double* p)
-{
- *p=0;
- if (doubleProps.contains(key)) {
- if (doubleProps[key].count()>index) {
- *p=doubleProps[key][index];
- return kOfxStatOK;
- }
- return kOfxStatErrBadIndex;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::getPropN(QString key,
- double **p)
-{
- *p=nullptr;
- if (doubleProps.contains(key)) {
- *p=doubleProps[key].data();
- return kOfxStatOK;
- }
- return kOfxStatErrUnknown;
-}
-OfxStatus olive::plugin::OlivePlugin::setProp(QString key, int index, char *str)
-{
- char *p=(char*)calloc(strlen(str)+1,sizeof(char));
- strcpy(p,str);
- if (stringProps.contains(key)) {
- if (stringProps[key].count()>index) {
- stringProps[key].insert(index, p);
- return kOfxStatOK;
- }
- stringProps[key].emplace_back(p);
- return kOfxStatOK;
- }
- QVector vec;
- vec.emplace_back(str);
- stringProps[key]=vec;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setPropN(QString key, int count, char **strs)
-{
- QVector vector;
- for (int i=0;iindex) {
- pointerProps[key].insert(index, p);
- return kOfxStatOK;
- }
- pointerProps[key].emplace_back(p);
- return kOfxStatOK;
- }
- QVector vec;
- vec.emplace_back(p);
- pointerProps[key]=vec;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setPropN(QString key,int count, void **ps)
-{
- QVector vector;
- vector.reserve(count);
- memcpy(vector.data(), ps, sizeof(void *)*count);
- pointerProps[key]=vector;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setProp(QString key, int index, int p)
-{
- if (intProps.contains(key)) {
- if (intProps[key].count()>index) {
- intProps[key].insert(index, p);
- return kOfxStatOK;
- }
- intProps[key].emplace_back(p);
- return kOfxStatOK;
- }
- QVector vec;
- vec.emplace_back(p);
- intProps[key]=vec;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setPropN(QString key,int count, int *ps)
-{
- QVector vector;
- vector.reserve(count);
- memcpy(vector.data(), ps, sizeof(int)*count);
- intProps[key]=vector;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setProp(QString key, int index, double p)
-{
- if (doubleProps.contains(key)) {
- if (doubleProps[key].count()>index) {
- doubleProps[key].insert(index, p);
- return kOfxStatOK;
- }
- doubleProps[key].emplace_back(p);
- return kOfxStatOK;
- }
- QVector vec;
- vec.emplace_back(p);
- doubleProps[key]=vec;
- return kOfxStatOK;
-}
-OfxStatus olive::plugin::OlivePlugin::setPropN(QString key,int count, double *ps)
-{
- QVector vector;
- vector.reserve(count);
- memcpy(vector.data(), ps, sizeof(doubleProps)*count);
- doubleProps[key]=vector;
- return kOfxStatOK;
-}
-
diff --git a/app/pluginSupport/OlivePlugin.h b/app/pluginSupport/OlivePlugin.h
deleted file mode 100644
index 6ccc9f4dd..000000000
--- a/app/pluginSupport/OlivePlugin.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
-
-#ifndef OLIVE_PLUGIN_H
-#define OLIVE_PLUGIN_H
-#include "OlivePlugin.h"
-#include "ofxCore.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-namespace olive
-{
-namespace plugin
-{
-class Value;
-enum class Type {
- FLOAT, STRING, INT, POINTER, ARRAY, NONE
-};
-struct plugin_mem_ptr {
- void *mem;
- int32_t count=0;
-};
-class OlivePlugin {
-public:
- OlivePlugin()=default;
- ~OlivePlugin();
- OfxStatus getProp(QString key, int index, char **str);
- OfxStatus getPropN(QString key, char *** strs);
- OfxStatus getProp(QString key, int index, void **p);
- OfxStatus getPropN(QString key, void ***ps);
- OfxStatus getProp(QString key, int index, int *p);
- OfxStatus getPropN(QString key, int **ps);
- OfxStatus getProp(QString key, int index, double *p);
- OfxStatus getPropN(QString key, double **ps);
- OfxStatus setProp(QString key, int index, char *str);
- OfxStatus setPropN(QString key,int count, char ** strs);
- OfxStatus setProp(QString key, int index, void *p);
- OfxStatus setPropN(QString key,int count, void **ps);
- OfxStatus setProp(QString key, int index, int p);
- OfxStatus setPropN(QString key,int count, int *ps);
- OfxStatus setProp(QString key, int index, double p);
- OfxStatus setPropN(QString key, int count, double *ps);
- void addMem(void *mem)
- {
- mems.emplace_back(mem);
- }
-private:
- uint64_t id;
- QString name;
- QString version;
- QMap> stringProps;
- QMap> intProps;
- QMap> doubleProps;
- QMap> pointerProps;
- std::list mems;
-};
-}
-}
-struct OfxPropertySetStruct {
- olive::plugin::OlivePlugin* plugin;
-};
-#endif //OLIVE_PLUGIN_H
diff --git a/app/pluginSupport/OpenGLRender.cpp b/app/pluginSupport/OpenGLRender.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/OpenGLRender.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Param.cpp b/app/pluginSupport/Param.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Param.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/ParametricParam.cpp b/app/pluginSupport/ParametricParam.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/ParametricParam.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Pixels.cpp b/app/pluginSupport/Pixels.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Pixels.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Progress.cpp b/app/pluginSupport/Progress.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/Progress.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/app/pluginSupport/Property.cpp b/app/pluginSupport/Property.cpp
deleted file mode 100644
index fad450e9e..000000000
--- a/app/pluginSupport/Property.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
-#include "node/plugins/Plugin.h"
-
-#include
-#include
-#include
-
-OfxStatus propSetPointer(OfxPropertySetHandle properties,
- const char *property, int index, void *value)
-{
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetString(OfxPropertySetHandle properties,
- const char *property, int index, const char *value)
-{
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setProp(property, index, const_cast(value));
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetDouble(OfxPropertySetHandle properties,
- const char *property, int index, double value)
-{
-
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetInt(OfxPropertySetHandle properties, const char *property,
- int index, int value)
-{
-
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetPointerN(OfxPropertySetHandle properties,
- const char *property, int count, void * const*value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setPropN(property, count, const_cast(value));
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetStringN(OfxPropertySetHandle properties,
- const char *property, int index, int count,const char *const *value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setPropN(property, count, const_cast(value));
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetDoubleN(OfxPropertySetHandle properties,
- const char *property,int count, const double* value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setPropN(property, count, const_cast(value));
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetIntN(OfxPropertySetHandle properties, const char *property,
- int count, const int *value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->setPropN(property, count, const_cast(value));
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetPointer(OfxPropertySetHandle properties,
- const char *property, int index, void **value)
-{
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetString(OfxPropertySetHandle properties,
- const char *property, int index, char **value)
-{
- std::any val;
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetDouble(OfxPropertySetHandle properties,
- const char *property, int index, double *value)
-{
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetInt(OfxPropertySetHandle properties, const char *property,
- int index, int *value)
-{
- if (properties->plugin) {
- if (index<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getProp(property, index, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetPointerN(OfxPropertySetHandle properties,
- const char *property, int count, void ***value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getPropN(property, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propGetStringN(OfxPropertySetHandle properties,
- const char *property, int count, char ***value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getPropN(property, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetDoubleN(OfxPropertySetHandle properties,
- const char *property, int index, int count, double** value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getPropN(property, value);
- }
- return kOfxStatErrBadHandle;
-}
-
-OfxStatus propSetIntN(OfxPropertySetHandle properties, const char *property,
- int index, int count, int **value)
-{
- if (properties->plugin) {
- if (count<0) {
- return kOfxStatErrBadIndex;
- }
- return properties->plugin->getPropN(property, value);
- }
- return kOfxStatErrBadHandle;
-}
diff --git a/app/pluginSupport/TimeLine.cpp b/app/pluginSupport/TimeLine.cpp
deleted file mode 100644
index 52182e8d4..000000000
--- a/app/pluginSupport/TimeLine.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Olive Community Edition - 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 .
- */
diff --git a/third_party/openfx b/third_party/openfx
deleted file mode 160000
index 6aa45d817..000000000
--- a/third_party/openfx
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 6aa45d81799f04208af26434cc62a292ebd22924
diff --git a/third_party/openfx/HostSupport/BUILDING b/third_party/openfx/HostSupport/BUILDING
new file mode 100644
index 000000000..de4d2328c
--- /dev/null
+++ b/third_party/openfx/HostSupport/BUILDING
@@ -0,0 +1,37 @@
+Dependencies
+------------
+
+Dependent upon the following
+
+*the expat library (expat.h) - to parse XML
+*ofx header files
+
+How to build the library
+------------------------
+
+UNIX
+ - simply type 'make' in this directory, it will create 'libofxHost.a' in directory ./lib
+ - the Makefile assumes expat is installed in a standard system location, if it is not,
+ you need to do the following
+
+ make EXPAT_INCLUDE=-IDIRECTORY_WITH_EXPAT
+
+WINDOWS
+ - use the vc8 projects
+
+
+How to build the examples
+------------------------
+
+UNIX
+ - make the ofxHostLib.a library
+ - in the examples directory type 'make',
+ - the Makefile assumes expat is installed in a standard system location, if it is not,
+ you need to do the following
+
+ make EXPAT_INCLUDE=-IDIRECTORY_WITH_EXPAT EXPAT_LIB=SOMEWHERE/libexpat.a
+
+WINDOWS
+ - use the vc8 projects
+
+
diff --git a/third_party/openfx/HostSupport/CMakeLists.txt b/third_party/openfx/HostSupport/CMakeLists.txt
new file mode 100644
index 000000000..61fc531d3
--- /dev/null
+++ b/third_party/openfx/HostSupport/CMakeLists.txt
@@ -0,0 +1,22 @@
+set(OFX_HOSTSUPPORT_HEADER_DIR "include")
+set(OFX_HOSTSUPPORT_LIBRARY_DIR "src")
+set(OFX_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../include")
+aux_source_directory(OFX_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../include")
+file(GLOB_RECURSE OFX_HOSTSUPPORT_HEADER_FILES "${OFX_HOSTSUPPORT_HEADER_DIR}/*.h")
+file(GLOB_RECURSE OFX_HOSTSUPPORT_LIBRARY_FILES "${OFX_HOSTSUPPORT_LIBRARY_DIR}/*.cpp")
+add_library(OfxHost STATIC
+ ${OFX_HEADER_FILES}
+ ${OFX_HOSTSUPPORT_HEADER_FILES}
+ ${OFX_HOSTSUPPORT_LIBRARY_FILES})
+
+set_target_properties(OfxHost PROPERTIES LINKER_LANGUAGE CXX)
+if(NOT MSVC)
+ set_target_properties(OfxHost PROPERTIES COMPILE_FLAGS "-fPIC")
+endif()
+
+target_link_libraries(OfxHost PUBLIC expat::expat)
+
+target_include_directories(OfxHost PUBLIC
+ ${OFX_HEADER_DIR}
+ ${OFX_HOSTSUPPORT_HEADER_DIR}
+ ${expat_INCLUDE_DIR})
diff --git a/third_party/openfx/HostSupport/README b/third_party/openfx/HostSupport/README
new file mode 100644
index 000000000..83d00609f
--- /dev/null
+++ b/third_party/openfx/HostSupport/README
@@ -0,0 +1,69 @@
+This directory contains source to an implementation of an OFX host C++ support library.
+This library skins the raw C API with a C++ layer, which is easy to program and abstracts
+the base API.
+
+It does several things,
+ - skins the C API with C++ classes, the host application 'only' needs to
+ - derive several classes
+ - implement a bunch of virtual methods
+ - set some OFX properties
+ - does most of the complicated logic in OFX,
+ - regions of interest calls
+ - clip preferences calls
+ - provides a persistent plug-in caching mechanism so that
+ - newly installed plug-ins are described into a cache file,
+ - the cache persists as an XML file with enough information
+ to construct simple menus etc..
+ - once cached, plug-ins need only be loaded on demand.
+ - is extensible beyond the base API,
+ - allows hosts to provide extra suites and properties fairly easily.
+ - it is generic beyond ImageEffects APIs, so other APIs can be implemented
+ on the core sections of it.
+
+Apart from standard C and C++ libraries it is dependent on the expat XML library.
+
+You'll still need to understand what the API actually does, its just that the implementation details that become easier.
+
+The layer could do with some improvement, specifically,
+ - support for the external XML resource file,
+ - a degree more tidying up,
+ - parameter interacts
+ - more documentation.
+
+Released under a BSD-style licence: see source.
+
+Authors:
+ Abigail Brady
+ Andrew Whitmore
+ Bruno Nicoletti
+
+Release Notes
+-------------
+
+26/03/2007
+
+Minimum implementation, which allows plugin descriptions to be cached. Includes property sets and
+property suite and implementation of plugin description. Support for describing in context and
+parameters not fully enabled.
+
+29/03/2007
+
+Support for describing in contexts and parameters. These are cached as well.
+
+25/06/2007
+
+Major overhaul of the thing,
+ - propertys made simpler to use
+ - re-namespaced several classes so that anything to do with image effects are
+ in the ImageEffect namespace
+ - made the host layer do the logic for several Image Effect actions
+ - clip preferences
+ - regions of interest
+ - simplified the function signatures of the actions
+ - the 'Host' class now acts as,
+ - a factory,
+ - a filter for constructed objects,
+ - a description of the host application to the plugin.
+
+# SPDX-License-Identifier: BSD-3-Clause
+
diff --git a/third_party/openfx/HostSupport/TTD b/third_party/openfx/HostSupport/TTD
new file mode 100644
index 000000000..525a5e760
--- /dev/null
+++ b/third_party/openfx/HostSupport/TTD
@@ -0,0 +1,17 @@
+Things to do. This is a wish list of features to add to the host layer...
+
+Common Base Class for All Plugin Instances
+ - currently using a void * to pass instance pointers to components that do not
+ need to know about image effects (eg: interact base classes).
+ - Should have a base 'Plugin::Instance' class that ImageEffect::Instance and any
+ other kind of plugin instance should derive from.
+
+XML Resource Support
+ - have the host layer manage the external XML resource file and relabel things appropriately.
+
+Support for Custom Params
+ - not there yet
+ - should have the host layer manage most of the custom param animation stuff as well.
+
+
+
diff --git a/third_party/openfx/HostSupport/include/ofxhBinary.h b/third_party/openfx/HostSupport/include/ofxhBinary.h
new file mode 100644
index 000000000..70b4d05f8
--- /dev/null
+++ b/third_party/openfx/HostSupport/include/ofxhBinary.h
@@ -0,0 +1,96 @@
+
+
+#ifndef OFX_BINARY_H
+#define OFX_BINARY_H
+
+// Copyright OpenFX and contributors to the OpenFX project.
+// SPDX-License-Identifier: BSD-3-Clause
+#include
+#include
+
+#if defined(WIN32) || defined(WIN64)
+#define I386
+#elif defined(__linux__) || defined(__FreeBSD__)
+#define UNIX
+#ifdef __i386__
+#define I386
+#elif defined(__amd64__)
+#define AMD64
+#else
+#error cannot detect architecture
+#endif
+#elif defined( __APPLE__)
+#define UNIX
+#else
+#error cannot detect operating system
+#endif
+
+#if defined(UNIX)
+#include
+#elif defined (WINDOWS)
+#include "windows.h"
+#include
+#endif
+
+#include
+
+namespace OFX
+{
+
+ /// class representing a DLL/Shared Object/etc
+ class Binary {
+ /// destruction will close the library and invalidate
+ /// any function pointers returned by lookupSymbol()
+ protected :
+ std::string _binaryPath;
+ bool _invalid;
+#if defined(UNIX)
+ void *_dlHandle;
+#elif defined (WINDOWS)
+ HINSTANCE _dlHandle;
+#endif
+ time_t _time;
+ off_t _size;
+ int _users;
+ public :
+
+ /// create object representing the binary. will stat() it,
+ /// and this fails, will set binary to be invalid.
+ Binary(const std::string &binaryPath);
+
+ ~Binary() { unload(); }
+
+ bool isLoaded() const { return _dlHandle != 0; }
+
+ /// is this binary invalid? (did the a stat() or load() on the file fail,
+ /// or are we missing a some of the symbols?
+ bool isInvalid() const { return _invalid; }
+
+ /// set invalid status (e.g. called by user if a mandatory symbol was missing)
+ void setInvalid(bool invalid) { _invalid = invalid; }
+
+ /// Last modification time of the file.
+ time_t getTime() const { return _time; }
+
+ /// Current size of the file.
+ off_t getSize() const { return _size; }
+
+ /// Path to the file.
+ const std::string &getBinaryPath() const { return _binaryPath; }
+
+ void ref();
+ void unref();
+
+ /// open the binary.
+ void load();
+
+ /// close the binary
+ void unload();
+
+ /// look up a symbol in the binary file and return it as a pointer.
+ /// returns null pointer if not found, or if the library is not loaded.
+ void *findSymbol(const std::string &symbol);
+ };
+}
+
+#endif
diff --git a/third_party/openfx/HostSupport/include/ofxhClip.h b/third_party/openfx/HostSupport/include/ofxhClip.h
new file mode 100755
index 000000000..495f4355f
--- /dev/null
+++ b/third_party/openfx/HostSupport/include/ofxhClip.h
@@ -0,0 +1,499 @@
+
+// Copyright OpenFX and contributors to the OpenFX project.
+// SPDX-License-Identifier: BSD-3-Clause
+
+#ifndef OFX_CLIP_H
+#define OFX_CLIP_H
+
+#include "ofxImageEffect.h"
+#include "ofxhPropertySuite.h"
+#include "ofxhUtilities.h"
+
+namespace OFX {
+
+ namespace Host {
+
+ namespace ImageEffect {
+ // forward declarations
+ class Image;
+ class Instance;
+# ifdef OFX_SUPPORTS_OPENGLRENDER
+ class Texture;
+# endif
+
+ /// Base to both descriptor and instance it
+ /// is used to basically fetch common properties
+ /// by function name
+ class ClipBase {
+ protected :
+ Property::Set _properties;
+
+ public :
+ /// base ctor, for a descriptor
+ ClipBase();
+
+ virtual ~ClipBase() { }
+
+ /// ctor, when copy constructing an instance from a descripto
+ explicit ClipBase(const ClipBase &other);
+
+ /// name of the clip
+ const std::string &getName() const
+ {
+ return _properties.getStringProperty(kOfxPropName);
+ }
+
+ /// name of the clip
+ const std::string &getShortLabel() const;
+
+ /// name of the clip
+ const std::string &getLabel() const;
+
+ /// name of the clip
+ const std::string &getLongLabel() const;
+
+ /// return a std::vector of supported comp
+ const std::vector &getSupportedComponents() const;
+
+ /// is the given component supported
+ bool isSupportedComponent(const std::string &comp) const;
+
+ /// does the clip do random temporal access
+ bool temporalAccess() const;
+
+ /// is the clip optional
+ bool isOptional() const;
+
+ /// is the clip a nominal 'mask' clip
+ bool isMask() const;
+
+ /// how does this clip like fielded images to be presented to it
+ const std::string &getFieldExtraction() const;
+
+ /// is the clip a nominal 'mask' clip
+ bool supportsTiles() const;
+
+ /// get property set, const version
+ const Property::Set &getProps() const;
+
+ /// get property set , non const version
+ Property::Set &getProps();
+
+ /// get a handle on the properties of the clip descriptor for the C api
+ OfxPropertySetHandle getPropHandle() const;
+
+ /// get a handle on the clip descriptor/instance for the C api
+ OfxImageClipHandle getHandle() const;
+
+ virtual bool verifyMagic() {
+ return true;
+ }
+ };
+
+ /// a clip descriptor
+ class ClipDescriptor : public ClipBase {
+ public:
+ /// constructor
+ ClipDescriptor(const std::string &name);
+
+ /// is the clip an output clip
+ bool isOutput() const {return getName() == kOfxImageEffectOutputClipName; }
+ };
+
+ /// a clip instance
+ class ClipInstance : public ClipBase
+ , protected Property::GetHook
+ , protected Property::NotifyHook {
+ protected:
+ ImageEffect::Instance* _effectInstance; ///< image effect instance
+ bool _isOutput; ///< are we the output clip
+ std::string _pixelDepth; ///< what is the bit depth we is at. Set during the clip prefernces action.
+ std::string _components; ///< what components do we have. Set during the clip prefernces action.
+
+ public:
+ ClipInstance(ImageEffect::Instance* effectInstance, ClipDescriptor& desc);
+
+ /// is the clip an output clip
+ bool isOutput() const {return _isOutput;}
+
+ /// notify override properties
+ virtual void notify(const std::string &name, bool isSingle, int indexOrN);
+
+ /// get hook override
+ virtual void reset(const std::string &name);
+
+ // get the virtuals for viewport size, pixel scale, background colour
+ virtual double getDoubleProperty(const std::string &name, int index) const;
+
+ // get the virtuals for viewport size, pixel scale, background colour
+ virtual void getDoublePropertyN(const std::string &name, double *values, int count) const;
+
+ // get the virtuals for viewport size, pixel scale, background colour
+ virtual int getIntProperty(const std::string &name, int index) const;
+
+ // get the virtuals for viewport size, pixel scale, background colour
+ virtual void getIntPropertyN(const std::string &name, int *values, int count) const;
+
+ // get the virtuals for viewport size, pixel scale, background colour
+ virtual const std::string &getStringProperty(const std::string &name, int index) const;
+
+ // fetch multiple values in a multi-dimension property
+ virtual void getStringPropertyN(const std::string &name, const char** values, int count) const;
+
+ // get hook virtuals
+ virtual int getDimension(const std::string &name) const;
+
+ // instance changed action
+ OfxStatus instanceChangedAction(const std::string &why,
+ OfxTime time,
+ OfxPointD renderScale);
+
+ // properties of an instance that are live
+
+ /// Pixel Depth - fetch depth of all chromatic component in this clip
+ ///
+ /// kOfxBitDepthNone (implying a clip is unconnected, not valid for an image)
+ /// kOfxBitDepthByte
+ /// kOfxBitDepthShort
+ /// kOfxBitDepthHalf
+ /// kOfxBitDepthFloat
+ const std::string &getPixelDepth() const
+ {
+ return _pixelDepth;
+ }
+
+ /// set the current pixel depth
+ /// called by clip preferences action
+ void setPixelDepth(const std::string &s)
+ {
+ _pixelDepth = s;
+ }
+
+ /// Components that can be fetched from this clip -
+ ///
+ /// kOfxImageComponentNone (implying a clip is unconnected, not valid for an image)
+ /// kOfxImageComponentRGBA
+ /// kOfxImageComponentRGB
+ /// kOfxImageComponentAlpha
+ /// and any custom ones you may think of
+ virtual const std::string &getComponents() const;
+
+ /// set the current set of components
+ /// called by clip preferences action
+ virtual void setComponents(const std::string &s);
+
+ /// Get the Raw Unmapped Pixel Depth from the host for chromatic planes
+ ///
+ /// \returns
+ /// - kOfxBitDepthNone (implying a clip is unconnected image)
+ /// - kOfxBitDepthByte
+ /// - kOfxBitDepthShort
+ /// - kOfxBitDepthHalf
+ /// - kOfxBitDepthFloat
+ virtual const std::string &getUnmappedBitDepth() const = 0;
+
+ /// Get the Raw Unmapped Components from the host
+ ///
+ /// \returns
+ /// - kOfxImageComponentNone (implying a clip is unconnected, not valid for an image)
+ /// - kOfxImageComponentRGBA
+ /// - kOfxImageComponentAlpha
+ virtual const std::string &getUnmappedComponents() const = 0;
+
+ // PreMultiplication -
+ //
+ // kOfxImageOpaque - the image is opaque and so has no premultiplication state
+ // kOfxImagePreMultiplied - the image is premultiplied by it's alpha
+ // kOfxImageUnPreMultiplied - the image is unpremultiplied
+ virtual const std::string &getPremult() const = 0;
+
+ // Pixel Aspect Ratio -
+ //
+ // The pixel aspect ratio of a clip or image.
+ virtual double getAspectRatio() const = 0;
+
+ // Frame Rate -
+ //
+ // The frame rate of a clip or instance's project.
+ virtual double getFrameRate() const = 0;
+
+ // Frame Range (startFrame, endFrame) -
+ //
+ // The frame range over which a clip has images.
+ virtual void getFrameRange(double &startFrame, double &endFrame) const = 0;
+
+ /// Field Order - Which spatial field occurs temporally first in a frame.
+ /// \returns
+ /// - kOfxImageFieldNone - the clip material is unfielded
+ /// - kOfxImageFieldLower - the clip material is fielded, with image rows 0,2,4.... occuring first in a frame
+ /// - kOfxImageFieldUpper - the clip material is fielded, with image rows line 1,3,5.... occuring first in a frame
+ virtual const std::string &getFieldOrder() const = 0;
+
+ // Connected -
+ //
+ // Says whether the clip is actually connected at the moment.
+ virtual bool getConnected() const = 0;
+
+ // Unmapped Frame Rate -
+ //
+ // The unmapped frame rate.
+ virtual double getUnmappedFrameRate() const = 0;
+
+ // Unmapped Frame Range -
+ //
+ // The unmapped frame range over which an output clip has images.
+ virtual void getUnmappedFrameRange(double &unmappedStartFrame, double &unmappedEndFrame) const = 0;
+
+ // Continuous Samples -
+ //
+ // 0 if the images can only be sampled at discreet times (eg: the clip is a sequence of frames),
+ // 1 if the images can only be sampled continuously (eg: the clip is infact an animating roto spline and can be rendered anywhen).
+ virtual bool getContinuousSamples() const = 0;
+
+ /// override this to fill in the image at the given time.
+ /// The bounds of the image on the image plane should be
+ /// 'appropriate', typically the value returned in getRegionsOfInterest
+ /// on the effect instance. Outside a render call, the optionalBounds should
+ /// be 'appropriate' for the.
+ /// If bounds is not null, fetch the indicated section of the canonical image plane.
+ virtual ImageEffect::Image* getImage(OfxTime time, const OfxRectD *optionalBounds) = 0;
+
+# ifdef OFX_SUPPORTS_OPENGLRENDER
+ /// override this to fill in the OpenGL texture at the given time.
+ /// The bounds of the image on the image plane should be
+ /// 'appropriate', typically the value returned in getRegionsOfInterest
+ /// on the effect instance. Outside a render call, the optionalBounds should
+ /// be 'appropriate' for the.
+ /// If bounds is not null, fetch the indicated section of the canonical image plane.
+ virtual ImageEffect::Texture* loadTexture(OfxTime time, const char *format, const OfxRectD *optionalBounds) = 0;
+# endif
+
+ /// override this to return the rod on the clip
+ virtual OfxRectD getRegionOfDefinition(OfxTime time) const = 0;
+
+ /// given the colour component, find the nearest set of supported colour components
+ /// override this for extra wierd custom component depths
+ virtual const std::string &findSupportedComp(const std::string &s) const;
+ };
+
+
+ /// instance of an image inside an image effect
+ class ImageBase : public Property::Set {
+ protected :
+ /// called during ctors to get bits from the clip props into ours
+ void getClipBits(ClipInstance& instance);
+ int _referenceCount; ///< reference count on this image
+
+ public:
+ // default constructor
+ virtual ~ImageBase();
+
+ /// basic ctor, makes empty property set but sets not value
+ ImageBase();
+
+ /// construct from a clip instance, but leave the
+ /// filling it to the calling code via the propery set
+ explicit ImageBase(ClipInstance& instance);
+
+ // Render Scale (renderScaleX,renderScaleY) -
+ //
+ // The proxy render scale currently being applied.
+ // ------
+ // Bounds (bx1,by1,bx2,by2) -
+ //
+ // The bounds of an image's pixels. The bounds, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // ROD (rodx1,rody1,rodx2,rody2) -
+ //
+ // The full region of definition. The ROD, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // Row Bytes -
+ //
+ // The number of bytes in a row of an image.
+ // ------
+ // Field -
+ //
+ // kOfxImageFieldNone - the image is an unfielded frame
+ // kOfxImageFieldBoth - the image is fielded and contains both interlaced fields
+ // kOfxImageFieldLower - the image is fielded and contains a single field, being the lower field (rows 0,2,4...)
+ // kOfxImageFieldUpper - the image is fielded and contains a single field, being the upper field (rows 1,3,5...)
+ // ------
+ // Unique Identifier -
+ //
+ // Uniquely labels an image. This is host set and allows a plug-in to differentiate between images. This is
+ // especially useful if a plugin caches analysed information about the image (for example motion vectors). The
+ // plugin can label the cached information with this identifier. If a user connects a different clip to the
+ // analysed input, or the image has changed in some way then the plugin can detect this via an identifier change
+ // and re-evaluate the cached information.
+
+ // construction based on clip instance
+ ImageBase(ClipInstance& instance, // construct from clip instance taking pixel depth, components, pre mult and aspect ratio
+ double renderScaleX,
+ double renderScaleY,
+ const OfxRectI &bounds,
+ const OfxRectI &rod,
+ int rowBytes,
+ std::string field,
+ std::string uniqueIdentifier);
+
+ // OfxImageClipHandle getHandle();
+ OfxPropertySetHandle getPropHandle() const { return Property::Set::getHandle(); }
+
+ /// get the bounds of the pixels in memory
+ OfxRectI getBounds() const;
+
+ /// get the full region of this image
+ OfxRectI getROD() const;
+
+ /// release the reference count, which, if zero, deletes this
+ void releaseReference();
+
+ /// add a reference to this image
+ void addReference() {_referenceCount++;}
+ };
+
+ /// instance of an image inside an image effect
+ class Image : public ImageBase {
+ public:
+ // default constructor
+ virtual ~Image();
+
+ /// basic ctor, makes empty property set but sets not value
+ Image();
+
+ /// construct from a clip instance, but leave the
+ /// filling it to the calling code via the propery set
+ explicit Image(ClipInstance& instance);
+
+ // Render Scale (renderScaleX,renderScaleY) -
+ //
+ // The proxy render scale currently being applied.
+ // ------
+ // Data -
+ //
+ // The pixel data pointer of an image.
+ // ------
+ // Bounds (bx1,by1,bx2,by2) -
+ //
+ // The bounds of an image's pixels. The bounds, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // ROD (rodx1,rody1,rodx2,rody2) -
+ //
+ // The full region of definition. The ROD, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // Row Bytes -
+ //
+ // The number of bytes in a row of an image.
+ // ------
+ // Field -
+ //
+ // kOfxImageFieldNone - the image is an unfielded frame
+ // kOfxImageFieldBoth - the image is fielded and contains both interlaced fields
+ // kOfxImageFieldLower - the image is fielded and contains a single field, being the lower field (rows 0,2,4...)
+ // kOfxImageFieldUpper - the image is fielded and contains a single field, being the upper field (rows 1,3,5...)
+ // ------
+ // Unique Identifier -
+ //
+ // Uniquely labels an image. This is host set and allows a plug-in to differentiate between images. This is
+ // especially useful if a plugin caches analysed information about the image (for example motion vectors). The
+ // plugin can label the cached information with this identifier. If a user connects a different clip to the
+ // analysed input, or the image has changed in some way then the plugin can detect this via an identifier change
+ // and re-evaluate the cached information.
+
+ // construction based on clip instance
+ Image(ClipInstance& instance, // construct from clip instance taking pixel depth, components, pre mult and aspect ratio
+ double renderScaleX,
+ double renderScaleY,
+ void* data,
+ const OfxRectI &bounds,
+ const OfxRectI &rod,
+ int rowBytes,
+ std::string field,
+ std::string uniqueIdentifier);
+ };
+
+# ifdef OFX_SUPPORTS_OPENGLRENDER
+ /// instance of an OpenGL texture inside an image effect
+ class Texture : public ImageBase {
+ public:
+ // default constructor
+ virtual ~Texture();
+
+ /// basic ctor, makes empty property set but sets not value
+ Texture();
+
+ /// construct from a clip instance, but leave the
+ /// filling it to the calling code via the propery set
+ explicit Texture(ClipInstance& instance);
+
+ // Render Scale (renderScaleX,renderScaleY) -
+ //
+ // The proxy render scale currently being applied.
+ // ------
+ // Index -
+ //
+ // The texture id (cast to GLuint).
+ // ------
+ // Target -
+ //
+ // The texture target (cast to GLenum).
+ // ------
+ // Bounds (bx1,by1,bx2,by2) -
+ //
+ // The bounds of an image's pixels. The bounds, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // ROD (rodx1,rody1,rodx2,rody2) -
+ //
+ // The full region of definition. The ROD, in PixelCoordinates, are of the
+ // addressable pixels in an image's data pointer. The order of the values is
+ // x1, y1, x2, y2. X values are x1 <= X < x2 Y values are y1 <= Y < y2
+ // ------
+ // Row Bytes -
+ //
+ // The number of bytes in a row of an image.
+ // ------
+ // Field -
+ //
+ // kOfxImageFieldNone - the image is an unfielded frame
+ // kOfxImageFieldBoth - the image is fielded and contains both interlaced fields
+ // kOfxImageFieldLower - the image is fielded and contains a single field, being the lower field (rows 0,2,4...)
+ // kOfxImageFieldUpper - the image is fielded and contains a single field, being the upper field (rows 1,3,5...)
+ // ------
+ // Unique Identifier -
+ //
+ // Uniquely labels an image. This is host set and allows a plug-in to differentiate between images. This is
+ // especially useful if a plugin caches analysed information about the image (for example motion vectors). The
+ // plugin can label the cached information with this identifier. If a user connects a different clip to the
+ // analysed input, or the image has changed in some way then the plugin can detect this via an identifier change
+ // and re-evaluate the cached information.
+
+ // construction based on clip instance
+ Texture(ClipInstance& instance, // construct from clip instance taking pixel depth, components, pre mult and aspect ratio
+ double renderScaleX,
+ double renderScaleY,
+ int index,
+ int target,
+ const OfxRectI &bounds,
+ const OfxRectI &rod,
+ int rowBytes,
+ std::string field,
+ std::string uniqueIdentifier);
+ };
+# endif
+ } // Memory
+
+ } // Host
+
+} // OFX
+
+#endif // OFX_CLIP_H
diff --git a/third_party/openfx/HostSupport/include/ofxhHost.h b/third_party/openfx/HostSupport/include/ofxhHost.h
new file mode 100644
index 000000000..c74158ee3
--- /dev/null
+++ b/third_party/openfx/HostSupport/include/ofxhHost.h
@@ -0,0 +1,84 @@
+
+#ifndef OFX_HOST_H
+#define OFX_HOST_H
+
+// Copyright OpenFX and contributors to the OpenFX project.
+// SPDX-License-Identifier: BSD-3-Clause
+
+#include