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 #386 from DolbyIO/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Kuba Audykowicz authored Sep 4, 2023
2 parents e1046ac + a4b6aff commit 64588b2
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 29 deletions.
2 changes: 1 addition & 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.9"
PLUGIN_VERSION: "1.2.0-beta.10"
CPP_SDK_VERSION: "2.6.1"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
PLUGIN_SOURCE_DIR: "DolbyIO"
Expand Down
2 changes: 1 addition & 1 deletion 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.9",
"VersionName": "1.2.0-beta.10",
"FriendlyName": "Dolby.io Virtual Worlds",
"Description": "Plugin integrating Dolby.io Communications.",
"Category": "Communications",
Expand Down
6 changes: 3 additions & 3 deletions DolbyIO/Source/Private/DolbyIOModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +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)); }};
BaseDir = FPaths::Combine(BaseDir, "bin");
BaseDir = FPaths::Combine(BaseDir, TEXT("bin"));
LoadDll(BaseDir, "avutil-57.dll");
LoadDll(BaseDir, "avcodec-59.dll");
LoadDll(BaseDir, "dvclient.dll");
Expand All @@ -39,13 +39,13 @@ class FDolbyIOModule final : public IModuleInterface
LoadDll(BaseDir, "video_processor.dll");
dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator);
#elif PLATFORM_MAC
BaseDir = FPaths::Combine(BaseDir, "lib");
BaseDir = FPaths::Combine(BaseDir, TEXT("lib"));
LoadDll(BaseDir, "libdolbyio_comms_media.dylib");
LoadDll(BaseDir, "libdolbyio_comms_sdk.dylib");
LoadDll(BaseDir, "libvideo_processor.dylib");
#elif PLATFORM_LINUX
BaseDir += "-ubuntu-20.04-clang10-libc++10";
BaseDir = FPaths::Combine(BaseDir, "lib");
BaseDir = FPaths::Combine(BaseDir, TEXT("lib"));
LoadDll(BaseDir, "libavutil.so.57");
LoadDll(BaseDir, "libavcodec.so.59");
LoadDll(BaseDir, "libavformat.so.59");
Expand Down
21 changes: 21 additions & 0 deletions DolbyIO/Source/Private/Subsystem/DolbyIOConference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ void UDolbyIOSubsystem::Handle(const remote_participant_added& Event)
}

BroadcastEvent(OnParticipantAdded, Info.Status, Info);
BroadcastRemoteParticipantConnectedIfNecessary(Info);
ProcessBufferedVideoTracks(Info.UserID);
}

Expand All @@ -264,6 +265,26 @@ void UDolbyIOSubsystem::Handle(const remote_participant_updated& Event)
}

BroadcastEvent(OnParticipantUpdated, Info.Status, Info);
BroadcastRemoteParticipantConnectedIfNecessary(Info);
BroadcastRemoteParticipantDisconnectedIfNecessary(Info);
}

void UDolbyIOSubsystem::BroadcastRemoteParticipantConnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo)
{
if (ParticipantInfo.Status == EDolbyIOParticipantStatus::OnAir)
{
BroadcastEvent(OnRemoteParticipantConnected, ParticipantInfo);
}
}

void UDolbyIOSubsystem::BroadcastRemoteParticipantDisconnectedIfNecessary(
const FDolbyIOParticipantInfo& ParticipantInfo)
{
if (ParticipantInfo.Status == EDolbyIOParticipantStatus::Left ||
ParticipantInfo.Status == EDolbyIOParticipantStatus::Kicked)
{
BroadcastEvent(OnRemoteParticipantDisconnected, ParticipantInfo);
}
}

void UDolbyIOSubsystem::Handle(const local_participant_updated& Event)
Expand Down
3 changes: 2 additions & 1 deletion DolbyIO/Source/Private/Subsystem/DolbyIOInitialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ void UDolbyIOObserver::InitializeComponent()
DLB_BIND(OnUnmuteParticipantError);

DLB_BIND(OnParticipantAdded);

DLB_BIND(OnParticipantUpdated);
DLB_BIND(OnRemoteParticipantConnected);
DLB_BIND(OnRemoteParticipantDisconnected);

DLB_BIND(OnLocalParticipantUpdated);

Expand Down
37 changes: 36 additions & 1 deletion DolbyIO/Source/Public/DolbyIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantAddedDelegate,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnRemoteParticipantConnectedDelegate,
const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnRemoteParticipantDisconnectedDelegate,
const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDolbyIOOnLocalParticipantUpdatedDelegate, const EDolbyIOParticipantStatus,
Status, const FDolbyIOParticipantInfo&, ParticipantInfo);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDolbyIOOnVideoTrackAddedDelegate, const FDolbyIOVideoTrack&, VideoTrack);
Expand Down Expand Up @@ -309,6 +313,10 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnRemoteParticipantConnectedDelegate OnRemoteParticipantConnected;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnRemoteParticipantDisconnectedDelegate OnRemoteParticipantDisconnected;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnVideoTrackAddedDelegate OnVideoTrackAdded;
Expand Down Expand Up @@ -341,6 +349,9 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem
void ToggleInputMute();
void ToggleOutputMute();

void BroadcastRemoteParticipantConnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo);
void BroadcastRemoteParticipantDisconnectedIfNecessary(const FDolbyIOParticipantInfo& ParticipantInfo);

void BroadcastVideoTrackAdded(const FDolbyIOVideoTrack& VideoTrack);
void BroadcastVideoTrackEnabled(const FDolbyIOVideoTrack& VideoTrack);
void ProcessBufferedVideoTracks(const FString& ParticipantID);
Expand Down Expand Up @@ -475,14 +486,30 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnErrorDelegate OnUnmuteParticipantError;

/** Triggered when a remote participant is added to the conference. */
/** Triggered when a remote participant is added to the conference.
*
* This event is triggered for all participants who were present in the conference at any time, including
* participants who joined and left and are no longer in the conference. The status of the participant provided by
* this event should be taken into account when handling this event.
*
* Users who are only interested in tracking whether a participant is currently connected to the conference are
* encouraged to use On Remote Participant Connected and On Remote Participant Disconnected for simplicity.
*/
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnParticipantAddedDelegate OnParticipantAdded;

/** Triggered when a remote participant's status is updated. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnParticipantUpdatedDelegate OnParticipantUpdated;

/** Triggered when a remote participant is connected to the conference. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnRemoteParticipantConnectedDelegate OnRemoteParticipantConnected;

/** Triggered when a remote participant is disconnected from the conference. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnRemoteParticipantDisconnectedDelegate OnRemoteParticipantDisconnected;

/** Triggered when the local participant's status is updated. */
UPROPERTY(BlueprintAssignable, Category = "Dolby.io Comms")
FDolbyIOOnLocalParticipantUpdatedDelegate OnLocalParticipantUpdated;
Expand Down Expand Up @@ -711,6 +738,14 @@ class DOLBYIO_API UDolbyIOObserver : public UActorComponent
void FwdOnParticipantUpdated(const EDolbyIOParticipantStatus Status, const FDolbyIOParticipantInfo& ParticipantInfo)
DLB_DEFINE_FORWARDER(OnParticipantUpdated, Status, ParticipantInfo);

UFUNCTION()
void FwdOnRemoteParticipantConnected(const FDolbyIOParticipantInfo& ParticipantInfo)
DLB_DEFINE_FORWARDER(OnRemoteParticipantConnected, ParticipantInfo);

UFUNCTION()
void FwdOnRemoteParticipantDisconnected(const FDolbyIOParticipantInfo& ParticipantInfo)
DLB_DEFINE_FORWARDER(OnRemoteParticipantDisconnected, ParticipantInfo);

UFUNCTION()
void FwdOnLocalParticipantUpdated(const EDolbyIOParticipantStatus Status,
const FDolbyIOParticipantInfo& ParticipantInfo)
Expand Down
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,4 @@

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: [Online documentation](https://api-references.dolby.io/comms-sdk-unreal/)

## Supported platforms

The plugin is compatible with the following operating systems:
- Windows 10 or later
- macOS 10.14 or later if you use UE4
- macOS 12.5 or later if you use UE5
- Ubuntu 20.04 or later

## Prerequisites

Before you start, make sure that you have:
- Unreal Engine 4.27 or later installed on your computer. For more details, see the [Unreal Engine download](https://www.unrealengine.com/en-US/download) page and the [4.27](https://docs.unrealengine.com/4.27/en-US/Basics/InstallingUnrealEngine/) or [5.2](https://docs.unrealengine.com/5.2/en-US/installing-unreal-engine/) installation manuals.
- A [Dolby.io](https://dolby.io) account. If you do not have an account, [sign up](https://dolby.io/signup) for free.
- A client access token or an app key and an app secret copied from the Communications & Media [Dolby.io Dashboard](https://dashboard.dolby.io/).

## Installation

1. Make sure that your project contains a `Plugins` folder in the root of your game folder. If you do not have this folder, create it.
2. Download the latest plugin [release](https://github.com/DolbyIO/comms-sdk-unreal/releases) for your platform and unpack the plugin to the `Plugins` folder.
3. Launch your project using the Unreal Editor and select `Edit > Plugins` from the menu to enable the plugin manually. This step requires restarting the editor.
You can find the plugin documentation [here](https://api-references.dolby.io/comms-sdk-unreal/).
26 changes: 26 additions & 0 deletions docs/docs/blueprints/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ Triggered automatically when a message is received.

Triggered automatically when a remote participant is added to the conference.

This event is triggered for all participants who were present in the conference at any time, including participants who joined and left and are no longer in the conference. The status of the participant provided by this event should be taken into account when handling this event. For more information, refer to the [graph of possible status changes](../../static/img/participant-status-changes.png).

Users who are only interested in tracking whether a participant is currently connected to the conference are encouraged to use [On Remote Participant Connected](#on-remote-participant-connected) and [On Remote Participant Disconnected](#on-remote-participant-disconnected) for simplicity.

#### Data provided
| Provides | Type | Description |
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
Expand All @@ -212,6 +216,28 @@ Triggered automatically when a remote participant's status is updated. For more

---

## On Remote Participant Connected

Triggered automatically when a remote participant is connected to the conference.

#### Data provided
| Provides | Type | Description |
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
| **Participant Info** | [Dolby.io Participant Info](types.mdx#dolbyio-participant-info) | Information about the participant. |

---

## On Remote Participant Disconnected

Triggered automatically when a remote participant is disconnected from the conference.

#### Data provided
| Provides | Type | Description |
|----------------------|:--------------------------------------------------------------------|:-----------------------------------|
| **Participant Info** | [Dolby.io Participant Info](types.mdx#dolbyio-participant-info) | Information about the participant. |

---

## On Screenshare Sources Received

Triggered by [**Dolby.io Get Screenshare Sources**](functions.md#dolbyio-get-screenshare-sources) when screen share sources are received.
Expand Down

0 comments on commit 64588b2

Please sign in to comment.