Navigation
API > API/Runtime > API/Runtime/MediaAssets
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UStreamableRenderAsset
- UTexture
- UMediaTexture
References
| Module | MediaAssets |
| Header | /Engine/Source/Runtime/MediaAssets/Public/MediaTexture.h |
| Include | #include "MediaTexture.h" |
Syntax
class UMediaTexture : public UTexture
Remarks
Implements a texture asset for rendering video tracks from UMediaPlayer assets.
note: derives directly from UTexture, not from UTexture2D or UTexture2DDynamic maybe should have been UTexture2DDynamic?
Variables
| Type | Name | Description | |
|---|---|---|---|
| TEnumAsByte< TextureAddress > | AddressX | The addressing mode to use for the X axis. | |
| TEnumAsByte< TextureAddress > | AddressY | The addressing mode to use for the Y axis. | |
| bool | AutoClear | Whether to clear the texture when no media is being played (default = enabled). | |
| FLinearColor | ClearColor | The color used to clear the texture if AutoClear is enabled (default = black). | |
| float | CurrentAspectRatio | Current aspect ratio | |
| TEnumAsByte< enum MediaTextureOrientation > | CurrentOrientation | Current media orientation | |
| bool | EnableGenMips | Basic enablement for mip generation (default = false). | |
| TObjectPtr< UMediaPlayer > | MediaPlayer | The media player asset associated with this texture. | |
| bool | NewStyleOutput | Enable new style output. | |
| uint8 | NumMips | The number of mips to use (default = 1). | |
| TEnumAsByte< enum MediaTextureOutputFormat > | OutputFormat |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UMediaTexture
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CacheNextAvailableSampleTime
(
FTimespan InNextSampleTime |
Caches the next available sample time from the queue when last rendering was made | |
| float | Gets the current aspect ratio of the texture. | ||
| int32 | Gets the number of samples that are available | ||
| float | Get current aspect ratio of presented frame. | ||
| MediaTextureOrientation | Get current orientation of presented frame. | ||
| int32 | GetHeight () |
Gets the current height of the texture. | |
| UMediaPlayer * | Get the media player that provides the video samples. | ||
| float | Get the texture's mip-map bias, clamped to a legal range. | ||
| FTimespan | Gets the next sample Time. | ||
| ERenderMode | Returns the ERenderMode of this media texture | ||
| int32 | Gets the current numbe of mips of the texture. | ||
| int32 | GetWidth () |
Gets the current width of the texture. | |
| void | Renders this media texture. | ||
| void | SetColorSpaceOverride
(
UE::Color::EColorSpace InColorspaceOverride |
Set an override for color space conversions | |
| void | SetDefaultMediaPlayer
(
UMediaPlayer* NewMediaPlayer |
Set the texture's default media player property. | |
| void | SetMediaPlayer
(
UMediaPlayer* NewMediaPlayer |
Set the media player that provides the video samples. | |
| void | SetMipMapBias
(
float InMipMapBias |
Set texture's mip-map bias, for use by the texture resource sampler. | |
| void | SetRenderedExternalTextureGuid
(
const FGuid& InNewGuid |
||
| void | SetRenderMode
(
ERenderMode InRenderMode |
Sets the ERenderMode of this media texture | |
| void | TickResource
(
FTimespan Timecode |
Tick the texture resource. | |
| void | Update the video sample queue, if necessary. | ||
| void | UpdateSampleInfo
(
const TSharedPtr< IMediaTextureSample, ESPMode::ThreadSafe >& Sample |
Update sample info |
Overridden from UTexture
| Type | Name | Description | |
|---|---|---|---|
| uint32 | CalcTextureMemorySizeEnum
(
ETextureMipCount Enum |
Calculates the size of this texture if it had MipCount miplevels streamed in. | |
| FTextureResource * | Implemented by subclasses to create a new resource for the texture. | ||
| FGuid | Access the GUID which defines this texture's resources externally through FExternalTextureRegistry | ||
| EMaterialValueType | |||
| uint32 | |||
| float | |||
| float | |||
| float | |||
| ETextureClass | Get Texture Class | ||
| void | Creates a new resource for the texture, and updates any cached references to the resource. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| FString | GetDesc () |
Return a one line description of an object for viewing in the thumbnail view of the generic browser | |
| void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). | |
| bool | Called during async load to determine if PostLoad can be called on the loading thread. | ||
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ERenderMode | Possible render modes of this media texture. |