engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IMediaPlayerFactory类 参考abstract

Interface for media player factories. 更多...

#include <IMediaPlayerFactory.h>

Public 成员函数

bool CanPlayUrl (const FString &Url, const IMediaOptions *Options) const
 Whether the player can play the specified source URL. 更多...
 
virtual bool CanPlayUrl (const FString &Url, const IMediaOptions *Options, TArray< FText > *OutWarnings, TArray< FText > *OutErrors) const =0
 Whether the player can play the specified source URL. 更多...
 
virtual TSharedPtr< IMediaPlayer, ESPMode::ThreadSafe > CreatePlayer (IMediaEventSink &EventSink)=0
 Creates a media player. 更多...
 
virtual FText GetDisplayName () const =0
 Get the human readable name of the player. 更多...
 
virtual FName GetPlayerName () const =0
 Get the unique name of the media player. 更多...
 
virtual FGuid GetPlayerPluginGUID () const =0
 Get the GUID for this player plugin. 更多...
 
virtual const TArray< FString > & GetSupportedPlatforms () const =0
 Get the names of platforms that the media player supports. 更多...
 
virtual bool SupportsFeature (EMediaFeature Feature) const =0
 Check whether the media player supports the specified feature. 更多...
 
bool SupportsPlatform (const FString &PlatformName) const
 Whether the player works on the given platform. 更多...
 
virtual ~IMediaPlayerFactory ()
 Virtual destructor.
 

详细描述

Interface for media player factories.

Media player factories are used to create instances of media player implementations. Most media players will be implemented inside plug-ins, which will register their factories on startup. The Media module will use the CanPlayUrl() method on this interface to determine which media player to instantiate for a given media source.

参见
IMediaPlayer

成员函数说明

◆ CanPlayUrl() [1/2]

bool IMediaPlayerFactory::CanPlayUrl ( const FString &  Url,
const IMediaOptions *  Options 
) const
inline

Whether the player can play the specified source URL.

参数
UrlThe media source URL to check.
OptionsOptional media player parameters.
返回
true if the source can be played, false otherwise.

◆ CanPlayUrl() [2/2]

virtual bool IMediaPlayerFactory::CanPlayUrl ( const FString &  Url,
const IMediaOptions *  Options,
TArray< FText > *  OutWarnings,
TArray< FText > *  OutErrors 
) const
pure virtual

Whether the player can play the specified source URL.

参数
UrlThe media source URL to check.
OptionsOptional media player parameters.
OutWarningsWill contain warning messages (optional).
OutErrorswill contain error messages (optional).
返回
true if the source can be played, false otherwise.

◆ CreatePlayer()

virtual TSharedPtr< IMediaPlayer, ESPMode::ThreadSafe > IMediaPlayerFactory::CreatePlayer ( IMediaEventSink &  EventSink)
pure virtual

Creates a media player.

参数
EventSinkThe object that will receive the player's events.
返回
A new media player, or nullptr if a player couldn't be created.

◆ GetDisplayName()

virtual FText IMediaPlayerFactory::GetDisplayName ( ) const
pure virtual

Get the human readable name of the player.

返回
Display name text.
参见
GetName

◆ GetPlayerName()

virtual FName IMediaPlayerFactory::GetPlayerName ( ) const
pure virtual

Get the unique name of the media player.

返回
Media player name, i.e. 'AndroidMedia' or 'WmfMedia'.
参见
GetDisplayName

◆ GetPlayerPluginGUID()

virtual FGuid IMediaPlayerFactory::GetPlayerPluginGUID ( ) const
pure virtual

Get the GUID for this player plugin.

返回
Media player GUID (usually corresponds to a player name)
参见
GetPlayerName

◆ GetSupportedPlatforms()

virtual const TArray< FString > & IMediaPlayerFactory::GetSupportedPlatforms ( ) const
pure virtual

Get the names of platforms that the media player supports.

The returned platforms names must match the ones returned by FPlatformProperties::IniPlatformName, i.e. "Windows", "Android", etc.

返回
Platform name collection.
参见
GetOptionalParameters, GetRequiredParameters, GetSupportedFileExtensions, GetSupportedUriSchemes

◆ SupportsFeature()

virtual bool IMediaPlayerFactory::SupportsFeature ( EMediaFeature  Feature) const
pure virtual

Check whether the media player supports the specified feature.

参数
FeatureThe feature to check.
返回
true if the feature is supported, false otherwise.

◆ SupportsPlatform()

bool IMediaPlayerFactory::SupportsPlatform ( const FString &  PlatformName) const
inline

Whether the player works on the given platform.

参数
PlatformNameThe name of the platform to check.
返回
true if the platform is supported, false otherwise.
参见
GetSupportedPlatforms

该类的文档由以下文件生成: