UMediaTexture

Implements a texture asset for rendering video tracks from [UMediaPlayer](API\Runtime\MediaAssets\UMediaPlayer) assets.

Windows
MacOS
Linux

Inheritance Hierarchy

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.

Variables

Name Description

Public variable

TEnumAsByte< Te...

 

AddressX

The addressing mode to use for the X axis.

Public variable

TEnumAsByte< Te...

 

AddressY

The addressing mode to use for the Y axis.

Public variable

bool

 

AutoClear

Whether to clear the texture when no media is being played (default = enabled).

Public variable

FLinearColor

 

ClearColor

The color used to clear the texture if AutoClear is enabled (default = black).

Public variable

bool

 

EnableGenMips

Basic enablement for mip generation.

Protected variable

UMediaPlayer &#...

 

MediaPlayer

The media player asset associated with this texture.

Public variable

uint8

 

NumMips

The number of mips to use (default = 1).

Constructors

Name Description

Public function

UMediaTexture

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

CacheNextAvailableSampleTime

(
    FTimespan InNextSampleTime
)

Caches the next available sample time from the queue when last rendering was made

Public function Const

float

 

GetAspectRatio()

Gets the current aspect ratio of the texture.

Public function Const

int32

 

GetAvailableSampleCount()

Gets the number of samples that are available

Public function Const

int32

 

GetHeight()

Gets the current height of the texture.

Public function Const

UMediaPlayer...

 

GetMediaPlayer()

Get the media player that provides the video samples.

Public function Const

FTimespan

 

GetNextSampleTime()

Gets the next sample Time.

Public function Const

int32

 

GetWidth()

Gets the current width of the texture.

Public function

void

 

SetDefaultMediaPlayer

(
    UMediaPlayer* NewMediaPlayer
)

Set the texture's default media player property.

Public function

void

 

SetMediaPlayer

(
    UMediaPlayer* NewMediaPlayer
)

Set the media player that provides the video samples.

Public function

void

 

SetRenderedExternalTextureGuid

(
    const FGuid& InNewGuid
)

Protected function

void

 

TickResource

(
    FTimespan Timecode
)

Tick the texture resource.

Protected function

void

 

UpdateQueue()

Update the video sample queue, if necessary.

Overridden from UTexture

Name Description

Public function Virtual

FTextureReso...

 

CreateResource()

Implemented by subclasses to create a new resource for the texture.

Public function Virtual Const

FGuid

 

GetExternalTextureGuid()

Access the GUID which defines this texture's resources externally through FExternalTextureRegistry

Public function Virtual Const

EMaterialVal...

 

GetMaterialType()

Public function Virtual Const

float

 

GetSurfaceHeight()

Public function Virtual Const

float

 

GetSurfaceWidth()

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

FString

 

GetDesc()

Return a one line description of an object for viewing in the thumbnail view of the generic browser

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

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).

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss