UMediaSource

Abstract base class for media sources.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MediaAssets

Header

/Engine/Source/Runtime/MediaAssets/Public/MediaSource.h

Include

#include "MediaSource.h"

Syntax

class UMediaSource :
    public UObject,
    public IMediaOptions

Remarks

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.

Functions

Name Description

Public function Virtual Const

FString

 

GetUrl()

Get the media source's URL string (must be implemented in child classes).

Public function

void

 

SetMediaOptionBool

(
    const FName& Key,
    bool Value
)

Set a boolean parameter to pass to the player.

Public function

void

 

SetMediaOptionDouble

(
    const FName& Key,
    double Value
)

Set a double parameter to pass to the player.

Public function

void

 

SetMediaOptionFloat

(
    const FName& Key,
    float Value
)

Set a float parameter to pass to the player.

Public function

void

 

SetMediaOptionInt64

(
    const FName& Key,
    int64 Value
)

Set an integer64 parameter to pass to the player.

Public function

void

 

SetMediaOptionString

(
    const FName& Key,
    const FString& Value
)

Set a string parameter to pass to the player.

Public function Virtual Const

bool

 

Validate()

Validate the media source settings (must be implemented in child classes).

Overridden from IMediaOptions

Name Description

Public function Virtual Const

FName

 

GetDesiredPlayerName()

Get the name of the desired native player.

Public function Virtual Const

bool

 

GetMediaOption

(
    const FName& Key,
    bool DefaultValue
)

Get a Boolean media option.

Public function Virtual Const

double

 

GetMediaOption

(
    const FName& Key,
    double DefaultValue
)

Get a double precision floating point media option.

Public function Virtual Const

int64

 

GetMediaOption

(
    const FName& Key,
    int64 DefaultValue
)

Get a signed integer media option.

Public function Virtual Const

FString

 

GetMediaOption

(
    const FName& Key,
    const FString& DefaultValue
)

Get a string media option.

Public function Virtual Const

FText

 

GetMediaOption

(
    const FName& Key,
    const FText& DefaultValue
)

Get a localized text media option.

Public function Virtual Const

TSharedPtr< ...

 

GetMediaOption

(
    const FName& Key,
    const TSharedPtr< FDataContainer, E...
)

Get a complex data type media option.

Public function Virtual Const

bool

 

HasMediaOption

(
    const FName& Key
)

Check whether the specified option is set.