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

Commit

Permalink
Merge pull request #409 from DolbyIO/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Kuba Audykowicz authored Sep 18, 2023
2 parents bf95173 + c7b444a commit ba41451
Show file tree
Hide file tree
Showing 20 changed files with 213 additions and 93 deletions.
59 changes: 58 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
packages: write

env:
PLUGIN_VERSION: "1.2.0-beta.11"
PLUGIN_VERSION: "1.2.0"
CPP_SDK_VERSION: "2.6.1"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
PLUGIN_SOURCE_DIR: "DolbyIO"
Expand Down Expand Up @@ -209,3 +209,60 @@ jobs:
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${{ github.workspace }}\\.github\\actions\\upload_assets\\upload_release_asset.ps1 -File DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-android:
if: false
strategy:
fail-fast: false
matrix:
version: ["5.2"]
runs-on: ["self-hosted", "X64", "macOS"]

env:
BUILD_PLATFORM: 'android'

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/bash
with:
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "${{ env.BUILD_PLATFORM }}64.zip"

- name: Repackage AARs
env:
AAR_PATH_BASE: "${{ github.workspace }}/${{ env.PLUGIN_SOURCE_DIR }}/comms-sdk-android-cppsdk-"
AAR_PATH: "${{ env.AAR_PATH_BASE }}${{ env.CPP_SDK_VERSION }}.aar"
AAR_NO_PREFAB_PATH: "${{ env.AAR_PATH_BASE }}noprefab-${{ env.CPP_SDK_VERSION }}.aar"
AAR_SHARED_PATH: "${{ env.AAR_PATH_BASE }}shared-${{ env.CPP_SDK_VERSION }}.aar"
run: |
./scripts/android.sh ${{ env.AAR_PATH }} ${{ env.AAR_NO_PREFAB_PATH }} ${{ env.AAR_SHARED_PATH }}
- name: Build plugin
env:
BUILD_COMMAND: "/Users/Shared/Epic\\ Games/UE_${{ matrix.version }}/Engine/Build/BatchFiles/RunUAT.sh"
BUILD_ARGS_PLATFORM: "-TargetPlatforms=Android -NoHostPlatform"
NDKROOT: "/Users/dolbyio/Library/Android/sdk/ndk/25.1.8937393"
run: |
${{ env.BUILD_COMMAND }} ${{ env.BUILD_ARGS_COMMON }} ${{ env.BUILD_ARGS_PLATFORM }}
- name: Zip plugin
working-directory: Build
run: |
zip -rq DolbyIO/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip DolbyIO/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}

- name: Release plugin πŸŽ‰
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${GITHUB_WORKSPACE}/.github/actions/upload_assets/upload_release_asset.sh DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
2 changes: 2 additions & 0 deletions DolbyIO/Config/FilterPluginAndroid.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[FilterPlugin]
/sdk-release-android/...
6 changes: 3 additions & 3 deletions DolbyIO/DolbyIO.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.2.0-beta.11",
"VersionName": "1.2.0",
"FriendlyName": "Dolby.io Virtual Worlds",
"Description": "Plugin integrating Dolby.io Communications.",
"Category": "Communications",
Expand All @@ -12,14 +12,14 @@
"SupportURL": "https://github.com/DolbyIO/comms-sdk-unreal/issues",
"EnabledByDefault": true,
"CanContainContent": true,
"IsBetaVersion": true,
"IsBetaVersion": false,
"Installed": false,
"Modules": [
{
"Name": "DolbyIO",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [ "Linux", "Mac", "Win64" ]
"WhitelistPlatforms": [ "Android", "Linux", "Mac", "Win64" ]
}
]
}
15 changes: 15 additions & 0 deletions DolbyIO/Source/DolbyIO.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public DolbyIO(ReadOnlyTargetRules Target) : base(Target)
{
ReleaseDir += "-ubuntu-20.04-clang10-libc++10";
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
ReleaseDir += "-android";
}
string SdkDir = Path.Combine("$(PluginDir)", ReleaseDir);
PublicIncludePaths.Add(Path.Combine(SdkDir, "include"));
string LibDir = Path.Combine(SdkDir, "lib");
Expand Down Expand Up @@ -97,5 +101,16 @@ public DolbyIO(ReadOnlyTargetRules Target) : base(Target)
RuntimeDependencies.Add(Path.Combine(LibDir, "libcac_dvdnr.so"));
RuntimeDependencies.Add(Path.Combine(LibDir, "model.dnr"));
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
LibDir = Path.Combine(SdkDir, "libs", "android.arm64-v8a");
string[] Libs = new string[] { Path.Combine(LibDir, "libdolbyio_comms_media.so"),
Path.Combine(LibDir, "libdolbyio_comms_sdk.so") };
PublicAdditionalLibraries.AddRange(Libs);

AdditionalPropertiesForReceipt.Add(
"AndroidPlugin",
Path.Combine(Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath), "DolbyIO_UPL.xml"));
}
}
}
38 changes: 38 additions & 0 deletions DolbyIO/Source/DolbyIO_UPL.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<init>
<log text="DolbyIO plugin init"/>
</init>

<baseBuildGradleAdditions>
<insert>
allprojects {
repositories {
flatDir {
</insert>
<insertValue value="dirs '$S(AbsPluginDir)/../sdk-release-android'"/>
<insertNewline/>
<insert>}}}</insert>
</baseBuildGradleAdditions>

<buildGradleAdditions>
<insert>
dependencies {
implementation name: 'comms-sdk-android-cppsdk-noprefab-2.7.0', ext: 'aar'
implementation name: 'comms-sdk-android-cppsdk-shared-2.7.0', ext: 'aar'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.7.20'
}
android {
packagingOptions {
pickFirst 'assets/model.dnr'
}
}
</insert>
</buildGradleAdditions>

<soLoadLibrary>
<loadLibrary
name="dolbyio_comms_sdk_android_cppsdk" failmsg="Failed to load libdolbyio_comms_sdk_android_cppsdk.so" />
</soLoadLibrary>

</root>
4 changes: 4 additions & 0 deletions DolbyIO/Source/Private/Utils/DolbyIOConversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ namespace DolbyIO
const dolbyio::comms::utils::participant_track_map::value_type& TrackMapItem)
{
FDolbyIOVideoTrack Ret;
#if PLATFORM_ANDROID // SDK 2.7
Ret.TrackID = ToFString(TrackMapItem.second.sdp_track_id);
#else // SDK 2.6
Ret.TrackID = ToFString(std::get<1>(TrackMapItem.second));
#endif
Ret.ParticipantID = ToFString(TrackMapItem.first);
Ret.bIsScreenshare = false;
return Ret;
Expand Down
20 changes: 20 additions & 0 deletions DolbyIO/Source/Private/Utils/DolbyIOErrorHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ namespace DolbyIO

void FErrorHandler::operator()(std::exception_ptr&& ExcPtr) const
{
#if PLATFORM_ANDROID
HandleErrorOnGameThread(MoveTemp(ExcPtr));
#else
HandleError([ExcP = MoveTemp(ExcPtr)] { std::rethrow_exception(ExcP); });
#endif
}

void FErrorHandler::HandleError() const
Expand Down Expand Up @@ -79,6 +83,22 @@ namespace DolbyIO
LogException("unknown exception", "");
}

void FErrorHandler::HandleErrorOnGameThread(std::exception_ptr&& ExcPtr) const
{
AsyncTask(ENamedThreads::GameThread,
[ExcP = MoveTemp(ExcPtr), CopySelf = *this]
{
try
{
std::rethrow_exception(ExcP);
}
catch (...)
{
CopySelf.HandleError();
}
});
}

void FErrorHandler::LogException(const FString& Type, const FString& What) const
{
const FString ErrorMsg = Type + ": " + What;
Expand Down
7 changes: 4 additions & 3 deletions DolbyIO/Source/Private/Utils/DolbyIOErrorHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ namespace DolbyIO

private:
void HandleError(TFunction<void()> Callee) const;
void HandleErrorOnGameThread(std::exception_ptr&& ExcPtr) const;
void LogException(const FString& Type, const FString& What) const;

FString File;
int Line;
UDolbyIOSubsystem& DolbyIOSubsystem;
const FString File;
const int Line;
const UDolbyIOSubsystem& DolbyIOSubsystem;
const FDolbyIOOnErrorDelegate* const OnError{};
};
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
With the Dolby.io Virtual Worlds plugin for Unreal Engine, you can easily integrate [Dolby.io](https://dolby.io) Spatial Audio, powered by Dolby Atmos technology into your virtual world applications.

You can find the plugin documentation [here](https://api-references.dolby.io/comms-sdk-unreal/).

This project is no longer maintained.
1 change: 1 addition & 0 deletions docs/docs/Intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The plugin is compatible with the following operating systems:
- macOS 10.14 or later if you use UE4
- macOS 12.5 or later if you use UE5
- Ubuntu 20.04 or later
- Android 8 or later if you use UE5.3 or later (experimental, arm64-v8a devices only)

## Prerequisites

Expand Down
12 changes: 0 additions & 12 deletions docs/docs/blueprints/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ Triggered by [**Dolby.io Disconnect**](functions.md#dolbyio-disconnect) when the

## On Error

:::info πŸš€ Beta
This event is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Triggered by functions if errors occur.

#### Data provided
Expand All @@ -158,10 +154,6 @@ Triggered by [**Dolby.io Set Token**](functions.md#dolbyio-set-token) when the p

## On Local Participant Updated

:::info πŸš€ Beta
This event is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Triggered when the local participant's status is updated as a result of calling [Connect](functions.md#dolbyio-connect), [Demo Conference](functions.md#dolbyio-demo-conference) or [Update User Metadata](functions.md#dolbyio-update-user-metadata).

#### Data provided
Expand All @@ -174,10 +166,6 @@ Triggered when the local participant's status is updated as a result of calling

## On Message Received

:::info πŸš€ Beta
This event is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Triggered automatically when a message is received.

#### Data provided
Expand Down
46 changes: 0 additions & 46 deletions docs/docs/blueprints/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Binds a dynamic material instance to hold the frames of the given video track. T

## Dolby.io Broadcast Message

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Sends a message to all participants in the current conference. The message size is limited to 16KB.

This function calls [Dolby.io Send Message](#dolbyio-send-message) with an empty array of selected participants.
Expand Down Expand Up @@ -50,10 +46,6 @@ Changes the screen sharing parameters if already sharing screen.

## Dolby.io Connect

:::info πŸš€ Beta
The **Video Codec** parameter is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Connects to a conference.

![](../../static/img/generated/DolbyIOConnect/img/nd_img_UK2Node_AsyncAction.png)
Expand Down Expand Up @@ -125,10 +117,6 @@ Disconnects from the current conference.

## Dolby.io Enable Video

:::info πŸš€ Beta
The **Blur Background** parameter is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Enables video streaming from the given video device or the default device if no device is given.

![](../../static/img/generated/DolbyIOEnableVideo/img/nd_img_UK2Node_AsyncAction.png)
Expand Down Expand Up @@ -205,10 +193,6 @@ Gets the current audio output device.

## Dolby.io Get Current Screenshare Source

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Gets the current screenshare source.

![](../../static/img/generated/DolbyIOGetCurrentScreenshareSource/img/nd_img_UK2Node_AsyncAction.png)
Expand All @@ -223,10 +207,6 @@ Gets the current screenshare source.

## Dolby.io Get Current Video Device

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Gets the current video device.

![](../../static/img/generated/DolbyIOGetCurrentVideoDevice/img/nd_img_UK2Node_AsyncAction.png)
Expand Down Expand Up @@ -282,10 +262,6 @@ Gets the texture to which video from a given track is being rendered.

## Dolby.io Get Token From URL

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Gets a Dolby.io client access token from a URL.

For convenience during early development and prototyping, this function is provided to acquire a client access token directly from the game.
Expand All @@ -308,10 +284,6 @@ For convenience during early development and prototyping, this function is provi

## Dolby.io Get Token Using App Key And Secret

:::info πŸš€ Beta
The function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs) and replaces **Get Dolby.io Token**. The behavior of **Get Dolby.io Token** remains unchanged; we only renamed the function.
:::

Gets a Dolby.io client access token using an app key and secret combination.

For convenience during early development and prototyping, this function is provided to acquire a client access token directly from the game.
Expand Down Expand Up @@ -380,10 +352,6 @@ Mutes a given participant for the local user.

## Dolby.io Send Message

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Sends a message to selected participants in the current conference. The message size is limited to 16KB.

![](../../static/img/generated/DolbyIOBlueprintFunctionLibrary/img/nd_img_SendMessage.png)
Expand All @@ -398,10 +366,6 @@ Sends a message to selected participants in the current conference. The message

## Dolby.io Set Audio Capture Mode

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Sets the preferred noise reduction mode and voice font.

![](../../static/img/generated/DolbyIOBlueprintFunctionLibrary/img/nd_img_SetAudioCaptureMode.png)
Expand Down Expand Up @@ -482,12 +446,6 @@ Calling this function even once disables the default behavior, which is to autom

## Dolby.io Set Log Settings

:::info πŸš€ Beta
The **Log to Console** parameter is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).

The **Log to File** parameter is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs). In previous versions, logs were always written to a file.
:::

Sets what to log in the Dolby.io C++ SDK.

This function should be called before the first call to [Set Token](#dolbyio-set-token) if the user needs logs about the plugin's operation. Calling this function more than once has no effect.
Expand Down Expand Up @@ -642,10 +600,6 @@ Unmutes a given participant for the local user.

## Dolby.io Update User Metadata

:::info πŸš€ Beta
This function is a part of the [Beta program](https://docs.dolby.io/communications-apis/docs/overview-beta-programs).
:::

Updates information about the local participant.

![](../../static/img/generated/DolbyIOBlueprintFunctionLibrary/img/nd_img_UpdateUserMetadata.png)
Expand Down
Loading

0 comments on commit ba41451

Please sign in to comment.