Navigation
API > API/Runtime > API/Runtime/MediaAssets
Abstract base class for media sources.
Media sources describe the location and/or settings of media objects that can be played in a media player, such as a video file on disk, a video stream on the internet, or a web cam attached to or built into the target device. The location is encoded as a media URL string, whose URI scheme and optional file extension will be used to locate a suitable media player.
| Name | UMediaSource |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaAssets/Public/MediaSource.h |
| Include Path | #include "MediaSource.h" |
Syntax
UCLASS (Abstract, EditInlineNew, BlueprintType, HideCategories=(Object), MinimalAPI)
class UMediaSource :
public UObject ,
public IMediaOptions
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMediaSource
Implements Interfaces
Derived Classes
Typedefs
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MediaOptionsMap | TMap< FName, FVariant > | Holds our media options. | MediaSource.h | |
| MediaSourceRenderer | TObjectPtr< UObject > | Renders thumnbnails for us. | MediaSource.h |
|
| ThumbnailImage | TObjectPtr< UTexture > | The thumbnail image. | MediaSource.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GenerateThumbnail() |
Starts the process to generate a thumbnail. | MediaSource.h | |
virtual FString GetDescriptionString() |
Gets a string that sums up the media source's description for UI purposes | MediaSource.h | |
virtual void GetDetailsPanelInfoElements
(
TArray< FInfoElement >& OutInfoElements |
Gets a list of text containing the media source's configuration and description for UI purposes | MediaSource.h | |
UTexture * GetThumbnail() |
Gets our thumbnail texture, if any. | MediaSource.h | |
| Get the media source's URL string (must be implemented in child classes). | MediaSource.h |
|
|
void SetMediaOptionBool
(
const FName& Key, |
Set a boolean parameter to pass to the player. | MediaSource.h |
|
void SetMediaOptionDouble
(
const FName& Key, |
Set a double parameter to pass to the player. | MediaSource.h | |
void SetMediaOptionFloat
(
const FName& Key, |
Set a float parameter to pass to the player. | MediaSource.h |
|
void SetMediaOptionInt64
(
const FName& Key, |
Set an integer64 parameter to pass to the player. | MediaSource.h |
|
| Set a string parameter to pass to the player. | MediaSource.h |
|
|
void SetThumbnail
(
UTexture* InTexture |
Sets what the thumbnail texture should be. | MediaSource.h | |
virtual bool Validate() |
Validate the media source settings (must be implemented in child classes). | MediaSource.h |
|
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
MediaSource.h |
Overridden from IMediaOptions
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FName GetDesiredPlayerName() |
MediaSource.h | ||
virtual FString GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual int64 GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual double GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual bool GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual FText GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual TSharedPtr< FDataContainer, ESPMode::ThreadSafe > GetMediaOption
(
const FName& Key, |
MediaSource.h | ||
virtual bool HasMediaOption
(
const FName& Key |
MediaSource.h | ||
virtual const UObject * ToUObject() |
MediaSource.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Get a mapping of file extensions to spawn delegates. | MediaSource.h | ||
static void RegisterSpawnFromFileExtension
(
const FString& Extension, |
Call this to register a callback when someone calls SpawnMediaSourceForString. | MediaSource.h | |
static UMediaSource * SpawnMediaSourceForString
(
const FString& MediaPath, |
Call this to try and create a media source appropriate for the media. | MediaSource.h | |
static void UnregisterSpawnFromFileExtension
(
const FString& Extension |
Call this to unregister a callback set with RegisterSpawnFromFileExtension. | MediaSource.h |