Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
More plugin loading fixes
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
djova-dolby committed Oct 9, 2023
1 parent 6aaac69 commit 7c13ce5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DolbyIO/Source/DolbyIO.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"));
}
Expand Down
3 changes: 3 additions & 0 deletions DolbyIO/Source/Private/DolbyIOModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class FDolbyIOModule final : public IModuleInterface
[](std::size_t Count, std::size_t Al) { return ::operator new(Count, static_cast<std::align_val_t>(Al)); },
::operator delete,
[](void* Ptr, std::size_t Al) { ::operator delete(Ptr, static_cast<std::align_val_t>(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");
Expand All @@ -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);
Expand All @@ -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";
Expand Down

0 comments on commit 7c13ce5

Please sign in to comment.