You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#JIRA: UE-141361 #preflight 62681303430b9997ebe27d9b #review-19870484 @thomas.engel @ruslan.idrisov @eric.renaudhoude #rb thomas.engel, ruslan.idrisov, eric.renaudhoude #rnx [CL 19921801 by Tony Wong in ue5-main branch]
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Delegates/Delegate.h"
|
|
#include "Modules/ModuleInterface.h"
|
|
|
|
class UMediaPlayer;
|
|
class UObject;
|
|
|
|
/**
|
|
* Interface for the MediaAssets module.
|
|
*/
|
|
class IMediaAssetsModule
|
|
: public IModuleInterface
|
|
{
|
|
public:
|
|
/** Delegate to get a player from a UObject. */
|
|
DECLARE_DELEGATE_RetVal_OneParam(UMediaPlayer*, FOnGetPlayerFromObject, UObject*);
|
|
|
|
/**
|
|
* Plugins should call this so they can provide a function to get a media player from an object.
|
|
*
|
|
* @param Delegate Delegate to get a media player.
|
|
* @return ID to pass in to UnregisterGetPlayerFromObject.
|
|
*/
|
|
virtual int32 RegisterGetPlayerFromObject(const FOnGetPlayerFromObject& Delegate) = 0;
|
|
|
|
/**
|
|
* Call this to unregister a delegate.
|
|
*
|
|
* @param DelegateID ID returned from RegisterGetPlayerFromObject.
|
|
*/
|
|
virtual void UnregisterGetPlayerFromObject(int32 DelegateID) = 0;
|
|
|
|
/**
|
|
* Call this to get a media player from an object.
|
|
* This will query any plugins that have called RegisterGetPlayerFromObject.
|
|
*
|
|
* @param Object Object to get the player from.
|
|
* @return Media player, or nullptr if none found.
|
|
*/
|
|
virtual UMediaPlayer* GetPlayerFromObject(UObject* Object) = 0;
|
|
|
|
/** Virtual destructor. */
|
|
virtual ~IMediaAssetsModule() { }
|
|
};
|