From 7c13ce5ff2b5a27046ed127a425f8270abc515a3 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Mon, 9 Oct 2023 13:25:29 +0200 Subject: [PATCH] More plugin loading fixes - For Windows add avformat in the build cs file -> It looks like the file to be loaded from cpp module file must be in cs also - For macOS include the dvdnr lib in cpp module file -> It was in the C# build file as a runtime dep --- DolbyIO/Source/DolbyIO.Build.cs | 5 +++-- DolbyIO/Source/Private/DolbyIOModule.cpp | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DolbyIO/Source/DolbyIO.Build.cs b/DolbyIO/Source/DolbyIO.Build.cs index df0466c7..e5b13763 100644 --- a/DolbyIO/Source/DolbyIO.Build.cs +++ b/DolbyIO/Source/DolbyIO.Build.cs @@ -38,6 +38,7 @@ public DolbyIO(ReadOnlyTargetRules Target) : base(Target) string[] Dlls = new string[] { "avutil-57.dll", "avcodec-59.dll", + "avformat-59.dll", "dvclient.dll", "dolbyio_comms_media.dll", "dolbyio_comms_sdk.dll", @@ -69,12 +70,12 @@ public DolbyIO(ReadOnlyTargetRules Target) : base(Target) { RuntimeDependencies.Add(Lib); } - RuntimeDependencies.Add(Path.Combine(LibDir, "libdlb_vidseg_c_api.dylib")); RuntimeDependencies.Add(Path.Combine(LibDir, "libdvclient.dylib")); - RuntimeDependencies.Add(Path.Combine(LibDir, "libdvdnr.dylib")); RuntimeDependencies.Add(Path.Combine(LibDir, "libopencv_core.4.5.dylib")); RuntimeDependencies.Add(Path.Combine(LibDir, "libopencv_imgcodecs.4.5.dylib")); RuntimeDependencies.Add(Path.Combine(LibDir, "libopencv_imgproc.4.5.dylib")); + RuntimeDependencies.Add(Path.Combine(LibDir, "libdvdnr.dylib")); + RuntimeDependencies.Add(Path.Combine(LibDir, "libdlb_vidseg_c_api.dylib")); RuntimeDependencies.Add(Path.Combine(LibDir, "model.dnr")); RuntimeDependencies.Add(Path.Combine(LibDir, "video_processor.model")); } diff --git a/DolbyIO/Source/Private/DolbyIOModule.cpp b/DolbyIO/Source/Private/DolbyIOModule.cpp index de1a0f40..0ab89202 100644 --- a/DolbyIO/Source/Private/DolbyIOModule.cpp +++ b/DolbyIO/Source/Private/DolbyIOModule.cpp @@ -24,6 +24,7 @@ class FDolbyIOModule final : public IModuleInterface [](std::size_t Count, std::size_t Al) { return ::operator new(Count, static_cast(Al)); }, ::operator delete, [](void* Ptr, std::size_t Al) { ::operator delete(Ptr, static_cast(Al)); }}; + // Add this here as I am not sure how Windows paths are interpreted (do I need the backslash) BaseDir = FPaths::Combine(BaseDir, TEXT("bin")); LoadDll(BaseDir, "avutil-57.dll"); LoadDll(BaseDir, "avcodec-59.dll"); @@ -35,6 +36,7 @@ class FDolbyIOModule final : public IModuleInterface LoadDll(BaseDir, "opencv_core451.dll"); LoadDll(BaseDir, "opencv_imgproc451.dll"); LoadDll(BaseDir, "opencv_imgcodecs451.dll"); + LoadDll(BaseDir, "dvdnr.dll"); LoadDll(BaseDir, "dlb_vidseg_c_api.dll"); LoadDll(BaseDir, "video_processor.dll"); dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator); @@ -46,6 +48,7 @@ class FDolbyIOModule final : public IModuleInterface LoadDll(BaseDir, "lib/libopencv_imgproc.4.5.dylib"); LoadDll(BaseDir, "lib/libopencv_imgcodecs.4.5.dylib"); LoadDll(BaseDir, "lib/libdlb_vidseg_c_api.dylib"); + LoadDll(BaseDir, "lib/libdvdnr.dylib"); LoadDll(BaseDir, "lib/libvideo_processor.dylib"); #elif PLATFORM_LINUX BaseDir += "-ubuntu-20.04-clang10-libc++10";