From 03fbd6c9d30e173fe8df2391b8ddd8db5e968b00 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Wed, 4 Oct 2023 18:34:37 +0200 Subject: [PATCH 1/6] Game packaging issue fixes - Fix packaging of C++SDK libraries for UE4 -> Include what is needed in the FilterPlugin.ini file -> UE4 doesn't look for per platform files like UE5, so leave them there - Change paths names back to what they were for library locations -> Not sure if this will help anything, but who knows -> This appears to working locally now. Krystian and I have been able to build on macOS platforms -> Also we have been able to package games and run them --- DolbyIO/Config/FilterPlugin.ini | 34 +++++++++++++++++ DolbyIO/Source/Private/DolbyIOModule.cpp | 47 ++++++++++++------------ 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/DolbyIO/Config/FilterPlugin.ini b/DolbyIO/Config/FilterPlugin.ini index ccebca2f..48e594ef 100644 --- a/DolbyIO/Config/FilterPlugin.ini +++ b/DolbyIO/Config/FilterPlugin.ini @@ -6,3 +6,37 @@ ; /README.txt ; /Extras/... ; /Binaries/ThirdParty/*.dll +; MacOS +/sdk-release/include/... +/sdk-release/lib/libcac_dvdnr.dylib +/sdk-release/lib/libdlb_vidseg_c_api.dylib +/sdk-release/lib/libdolbyio_comms_media.dylib +/sdk-release/lib/libdolbyio_comms_sdk.dylib +/sdk-release/lib/libdvclient.dylib +/sdk-release/lib/libdvdnr.dylib +/sdk-release/lib/libopencv_core.4.5.dylib +/sdk-release/lib/libopencv_imgcodecs.4.5.dylib +/sdk-release/lib/libopencv_imgproc.4.5.dylib +/sdk-release/lib/libvideo_processor.dylib +/sdk-release/lib/model.dnr +/sdk-release/lib/video_processor.model +; Linux +/sdk-release-ubuntu-20.04-clang10-libc++10/include/... +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libavcodec.so.59 +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libavformat.so.59 +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libavutil.so.57 +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libcac_dvdnr.so +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libdolbyio_comms_media.so +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libdolbyio_comms_sdk.so +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/libdvclient.so +/sdk-release-ubuntu-20.04-clang10-libc++10/lib/model.dnr +; Windows +/sdk-release/include/... +/sdk-release/bin/*.dll +/sdk-release/bin/model.dnr +/sdk-release/bin/video_processor.model +/sdk-release/lib/dolbyio_comms_media.lib +/sdk-release/lib/dolbyio_comms_sdk.lib +/sdk-release/lib/video_processor.lib +; Android +/sdk-release-android/... diff --git a/DolbyIO/Source/Private/DolbyIOModule.cpp b/DolbyIO/Source/Private/DolbyIOModule.cpp index a75adda6..75004537 100644 --- a/DolbyIO/Source/Private/DolbyIOModule.cpp +++ b/DolbyIO/Source/Private/DolbyIOModule.cpp @@ -24,34 +24,35 @@ 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)); }}; - BaseDir = FPaths::Combine(BaseDir, TEXT("bin")); - LoadDll(BaseDir, "avutil-57.dll"); - LoadDll(BaseDir, "avcodec-59.dll"); - LoadDll(BaseDir, "dvclient.dll"); - LoadDll(BaseDir, "dolbyio_comms_media.dll"); - LoadDll(BaseDir, "dolbyio_comms_sdk.dll"); + LoadDll(BaseDir, "bin/avutil-57.dll"); + LoadDll(BaseDir, "bin/avcodec-59.dll"); + LoadDll(BaseDir, "bin/dvclient.dll"); + LoadDll(BaseDir, "bin/dolbyio_comms_media.dll"); + LoadDll(BaseDir, "bin/dolbyio_comms_sdk.dll"); sdk::set_app_allocator(Allocator); - 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"); + LoadDll(BaseDir, "bin/opencv_core451.dll"); + LoadDll(BaseDir, "bin/opencv_imgproc451.dll"); + LoadDll(BaseDir, "bin/opencv_imgcodecs451.dll"); + LoadDll(BaseDir, "bin/dlb_vidseg_c_api.dll"); + LoadDll(BaseDir, "bin/video_processor.dll"); dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator); #elif PLATFORM_MAC - BaseDir = FPaths::Combine(BaseDir, TEXT("lib")); - LoadDll(BaseDir, "libdolbyio_comms_media.dylib"); - LoadDll(BaseDir, "libdolbyio_comms_sdk.dylib"); - LoadDll(BaseDir, "libvideo_processor.dylib"); + LoadDll(BaseDir, "lib/libdvclient.dylib"); + LoadDll(BaseDir, "lib/libdolbyio_comms_media.dylib"); + LoadDll(BaseDir, "lib/libdolbyio_comms_sdk.dylib"); + LoadDll(BaseDir, "lib/libopencv_core.4.5.dylib"); + 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/libvideo_processor.dylib"); #elif PLATFORM_LINUX BaseDir += "-ubuntu-20.04-clang10-libc++10"; - BaseDir = FPaths::Combine(BaseDir, TEXT("lib")); - LoadDll(BaseDir, "libavutil.so.57"); - LoadDll(BaseDir, "libavcodec.so.59"); - LoadDll(BaseDir, "libavformat.so.59"); - LoadDll(BaseDir, "libdvclient.so"); - LoadDll(BaseDir, "libdolbyio_comms_media.so"); - LoadDll(BaseDir, "libdolbyio_comms_sdk.so"); + LoadDll(BaseDir, "lib/libavutil.so.57"); + LoadDll(BaseDir, "lib/libavcodec.so.59"); + LoadDll(BaseDir, "lib/libavformat.so.59"); + LoadDll(BaseDir, "lib/libdvclient.so"); + LoadDll(BaseDir, "lib/libdolbyio_comms_media.so"); + LoadDll(BaseDir, "lib/libdolbyio_comms_sdk.so"); #endif } From 45e1ac458d8bdac1dec32b6698c8fd62a246453d Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Thu, 5 Oct 2023 15:45:53 +0200 Subject: [PATCH 2/6] Fix screen share close crash - Enum class was trying to be logged as string directly - For some reason this compiles? But it would crash in the handler - Add proper conversion to string --- .../Source/Private/Subsystem/DolbyIOScreenshare.cpp | 2 +- DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp | 12 ++++++++++++ DolbyIO/Source/Private/Utils/DolbyIOConversions.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DolbyIO/Source/Private/Subsystem/DolbyIOScreenshare.cpp b/DolbyIO/Source/Private/Subsystem/DolbyIOScreenshare.cpp index 6e275b2f..a81b3c5d 100644 --- a/DolbyIO/Source/Private/Subsystem/DolbyIOScreenshare.cpp +++ b/DolbyIO/Source/Private/Subsystem/DolbyIOScreenshare.cpp @@ -119,7 +119,7 @@ void UDolbyIOSubsystem::GetCurrentScreenshareSource() void UDolbyIOSubsystem::Handle(const screen_share_error& Event) { DLB_UE_LOG_BASE(Warning, "Received screen_share_error event source=%s type=%s description=%s force_stopped=%d", - *ToString(Event.source), Event.type, *ToFString(Event.description), Event.force_stopped); + *ToString(Event.source), *ToString(Event.type), *ToFString(Event.description), Event.force_stopped); if (Event.force_stopped) { StopScreenshare(); diff --git a/DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp b/DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp index 3f0358f8..8f5d64f4 100644 --- a/DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp +++ b/DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp @@ -105,6 +105,18 @@ namespace DolbyIO *(ToFText(Source.title).ToString())); } + FString ToString(dolbyio::comms::screen_share_error::error_type err_type) { + switch (err_type) { + case dolbyio::comms::screen_share_error::error_type::continuos_temporary: + return "Continuous but temporary"; + case dolbyio::comms::screen_share_error::error_type::permanent: + return "Permanent"; + default: + return ""; + } + } + + EDolbyIOParticipantStatus ToEDolbyIOParticipantStatus(std::optional Status) { if (Status) diff --git a/DolbyIO/Source/Private/Utils/DolbyIOConversions.h b/DolbyIO/Source/Private/Utils/DolbyIOConversions.h index 85332534..c4e124ec 100644 --- a/DolbyIO/Source/Private/Utils/DolbyIOConversions.h +++ b/DolbyIO/Source/Private/Utils/DolbyIOConversions.h @@ -19,6 +19,7 @@ namespace DolbyIO FString ToString(enum dolbyio::comms::audio_device::direction Direction); FString ToString(const dolbyio::comms::camera_device& Device); FString ToString(const dolbyio::comms::screen_share_source& Source); + FString ToString(dolbyio::comms::screen_share_error::error_type err_type); EDolbyIOParticipantStatus ToEDolbyIOParticipantStatus(std::optional Status); FDolbyIOParticipantInfo ToFDolbyIOParticipantInfo(const dolbyio::comms::participant_info& Info); From 9703972d256c21e9e4a04f5567cfc55f56bf2002 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Mon, 9 Oct 2023 12:59:10 +0200 Subject: [PATCH 3/6] Fix packaging on Windows - Revert path creation to account windows slash --- DolbyIO/Source/Private/DolbyIOModule.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/DolbyIO/Source/Private/DolbyIOModule.cpp b/DolbyIO/Source/Private/DolbyIOModule.cpp index 75004537..de1a0f40 100644 --- a/DolbyIO/Source/Private/DolbyIOModule.cpp +++ b/DolbyIO/Source/Private/DolbyIOModule.cpp @@ -24,17 +24,19 @@ 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)); }}; - LoadDll(BaseDir, "bin/avutil-57.dll"); - LoadDll(BaseDir, "bin/avcodec-59.dll"); - LoadDll(BaseDir, "bin/dvclient.dll"); - LoadDll(BaseDir, "bin/dolbyio_comms_media.dll"); - LoadDll(BaseDir, "bin/dolbyio_comms_sdk.dll"); + BaseDir = FPaths::Combine(BaseDir, TEXT("bin")); + LoadDll(BaseDir, "avutil-57.dll"); + LoadDll(BaseDir, "avcodec-59.dll"); + LoadDll(BaseDir, "avformat-59.dll"); + LoadDll(BaseDir, "dvclient.dll"); + LoadDll(BaseDir, "dolbyio_comms_media.dll"); + LoadDll(BaseDir, "dolbyio_comms_sdk.dll"); sdk::set_app_allocator(Allocator); - LoadDll(BaseDir, "bin/opencv_core451.dll"); - LoadDll(BaseDir, "bin/opencv_imgproc451.dll"); - LoadDll(BaseDir, "bin/opencv_imgcodecs451.dll"); - LoadDll(BaseDir, "bin/dlb_vidseg_c_api.dll"); - LoadDll(BaseDir, "bin/video_processor.dll"); + LoadDll(BaseDir, "opencv_core451.dll"); + LoadDll(BaseDir, "opencv_imgproc451.dll"); + LoadDll(BaseDir, "opencv_imgcodecs451.dll"); + LoadDll(BaseDir, "dlb_vidseg_c_api.dll"); + LoadDll(BaseDir, "video_processor.dll"); dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator); #elif PLATFORM_MAC LoadDll(BaseDir, "lib/libdvclient.dylib"); From 2ebdbc1c999e3600b5f63a05eb356d540864c9ac Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 7 Oct 2023 14:03:14 +0000 Subject: [PATCH 4/6] Bump postcss from 8.4.21 to 8.4.31 --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Taken-from: dependabot[bot] --- docs/package-lock.json | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 0fd6625b..de71840c 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -7964,9 +7964,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -8520,9 +8526,9 @@ } }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -8531,10 +8537,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, From 6aaac69d2662219a3d4859920024993251ad811e Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Fri, 6 Oct 2023 10:25:45 +0200 Subject: [PATCH 5/6] Bump version to 1.2.2 --- .github/workflows/build.yml | 2 +- DolbyIO/DolbyIO.uplugin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1e1293e..4b4e8ab0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ permissions: packages: write env: - PLUGIN_VERSION: "1.2.0" + PLUGIN_VERSION: "1.2.2" CPP_SDK_VERSION: "2.6.1" CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download" PLUGIN_SOURCE_DIR: "DolbyIO" diff --git a/DolbyIO/DolbyIO.uplugin b/DolbyIO/DolbyIO.uplugin index 93b9c437..cf176492 100644 --- a/DolbyIO/DolbyIO.uplugin +++ b/DolbyIO/DolbyIO.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "1.2.0", + "VersionName": "1.2.2", "FriendlyName": "Dolby.io Virtual Worlds", "Description": "Plugin integrating Dolby.io Communications.", "Category": "Communications", From 7c13ce5ff2b5a27046ed127a425f8270abc515a3 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Mon, 9 Oct 2023 13:25:29 +0200 Subject: [PATCH 6/6] 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";