Navigation
API > API/Runtime > API/Runtime/MediaAssets
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMediaSource
- UBaseMediaSource
- UFileMediaSource
- UImgMediaSource
- UStreamMediaSource
- UTimeSynchronizableMediaSource
- UCaptureCardMediaSource
- UAjaMediaSource
- UBlackmagicMediaSource
- URivermaxMediaSource
- UPlatformMediaSource
- UProxyMediaSource
- USharedMemoryMediaSource
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
| Type | Name | Description | |
|---|---|---|---|
| void | Starts the process to generate a thumbnail. | ||
| bool | GetCacheSettings
(
FMediaSourceCacheSettings& OutSettings |
Get the media source cache settings, if present. | |
| UTexture * | GetThumbnail () |
Gets our thumbnail texture, if any. | |
| FString | GetUrl () |
Get the media source's URL string (must be implemented in child classes). | |
| void | RegisterSpawnFromFileExtension
(
const FString& Extension, |
Call this to register a callback when someone calls SpawnMediaSourceForString. | |
| void | SetCacheSettings
(
const FMediaSourceCacheSettings& Settings |
Call this to set cache settings to pass to the player. | |
| void | SetMediaOptionBool
(
const FName& Key, |
Set a boolean parameter to pass to the player. | |
| void | SetMediaOptionDouble
(
const FName& Key, |
Set a double parameter to pass to the player. | |
| void | SetMediaOptionFloat
(
const FName& Key, |
Set a float parameter to pass to the player. | |
| void | SetMediaOptionInt64
(
const FName& Key, |
Set an integer64 parameter to pass to the player. | |
| void | SetMediaOptionString
(
const FName& Key, |
Set a string parameter to pass to the player. | |
| void | SetThumbnail
(
UTexture* InTexture |
Sets what the thumbnail texture should be. | |
| UMediaSource * | SpawnMediaSourceForString
(
const FString& MediaPath, |
Call this to try and create a media source appropriate for the media. | |
| void | UnregisterSpawnFromFileExtension
(
const FString& Extension |
Call this to unregister a callback set with RegisterSpawnFromFileExtension. | |
| bool | Validate () |
Validate the media source settings (must be implemented in child classes). |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. |
Overridden from IMediaOptions
| Type | Name | Description | |
|---|---|---|---|
| FName | Get the name of the desired native player. | ||
| FString | GetMediaOption
(
const FName& Key, |
Get a string media option. | |
| int64 | GetMediaOption
(
const FName& Key, |
Get a signed integer media option. | |
| double | GetMediaOption
(
const FName& Key, |
Get a double precision floating point media option. | |
| bool | GetMediaOption
(
const FName& Key, |
Get a Boolean media option. | |
| FText | GetMediaOption
(
const FName& Key, |
Get a localized text media option. | |
| TSharedPtr< FDataContainer, ESPMode::ThreadSafe > | GetMediaOption
(
const FName& Key, |
Get a complex data type media option. | |
| bool | HasMediaOption
(
const FName& Key |
Check whether the specified option is set. |