engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
UMediaTexture类 参考

Implements a texture asset for rendering video tracks from UMediaPlayer assets. 更多...

#include <MediaTexture.h>

继承自 UTexture .

Public 成员函数

virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
void CacheNextAvailableSampleTime (FTimespan InNextSampleTime)
 Caches the next available sample time from the queue when last rendering was made 更多...
 
float GetAspectRatio () const
 Gets the current aspect ratio of the texture. 更多...
 
int32 GetAvailableSampleCount () const
 Gets the number of samples that are available 更多...
 
float GetCurrentAspectRatio () const
 Get current aspect ratio of presented frame. 更多...
 
MediaTextureOrientation GetCurrentOrientation () const
 Get current orientation of presented frame. 更多...
 
virtual FString GetDesc () override
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
int32 GetHeight () const
 Gets the current height of the texture. 更多...
 
UMediaPlayer * GetMediaPlayer () const
 Get the media player that provides the video samples. 更多...
 
FTimespan GetNextSampleTime () const
 Gets the next sample Time. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) override
 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). 更多...
 
int32 GetWidth () const
 Gets the current width of the texture. 更多...
 
virtual bool IsPostLoadThreadSafe () const override
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
void SetMediaPlayer (UMediaPlayer *NewMediaPlayer)
 Set the media player that provides the video samples. 更多...
 

Protected 成员函数

void TickResource (FTimespan Timecode)
 Tick the texture resource. 更多...
 
void UpdatePlayerAndQueue ()
 Update the video sample queue, if necessary.
 
void UpdateSampleInfo (const TSharedPtr< IMediaTextureSample, ESPMode::ThreadSafe > &Sample)
 Update sample info
 

Protected 属性

UMediaPlayer * MediaPlayer
 The media player asset associated with this texture. 更多...
 

详细描述

Implements a texture asset for rendering video tracks from UMediaPlayer assets.

成员函数说明

◆ BeginDestroy()

virtual void UMediaTexture::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UObject .

◆ CacheNextAvailableSampleTime()

void UMediaTexture::CacheNextAvailableSampleTime ( FTimespan  InNextSampleTime)

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

参见
GetNextSampleTime

◆ GetAspectRatio()

float UMediaTexture::GetAspectRatio ( ) const

Gets the current aspect ratio of the texture.

返回
Texture aspect ratio.
参见
GetHeight, GetWidth

◆ GetAvailableSampleCount()

int32 UMediaTexture::GetAvailableSampleCount ( ) const

Gets the number of samples that are available

返回
The number of samples in the queue

◆ GetCurrentAspectRatio()

float UMediaTexture::GetCurrentAspectRatio ( ) const

Get current aspect ratio of presented frame.

返回
Aspect ratio of current frame

◆ GetCurrentOrientation()

MediaTextureOrientation UMediaTexture::GetCurrentOrientation ( ) const

Get current orientation of presented frame.

返回
Orientation of current frame

◆ GetHeight()

int32 UMediaTexture::GetHeight ( ) const

Gets the current height of the texture.

返回
Texture height (in pixels).
参见
GetAspectRatio, GetWidth

◆ GetMediaPlayer()

UMediaPlayer * UMediaTexture::GetMediaPlayer ( ) const

Get the media player that provides the video samples.

返回
The texture's media player, or nullptr if not set.
参见
SetMediaPlayer

◆ GetNextSampleTime()

FTimespan UMediaTexture::GetNextSampleTime ( ) const

Gets the next sample Time.

Only valid if GetAvailableSampleCount is greater than 0

注解
This value is cached when last render command was executed to keep single consumer requirements.
返回
FTimespan of the next sample or FTimespan::MinValue if no sample was available in the queue.
参见
GetAvailableSampleCount, CacheNextAvailableSampleTime

◆ GetResourceSizeEx()

virtual void UMediaTexture::GetResourceSizeEx ( FResourceSizeEx &  CumulativeResourceSize)
overridevirtual

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

参数
CumulativeResourceSizeStruct used to count up the cumulative size of the resource as to be displayed to artists/LDs in the Editor.

重载 UObject .

◆ GetWidth()

int32 UMediaTexture::GetWidth ( ) const

Gets the current width of the texture.

返回
Texture width (in pixels).
参见
GetAspectRatio, GetHeight

◆ IsPostLoadThreadSafe()

virtual bool UMediaTexture::IsPostLoadThreadSafe ( ) const
overridevirtual

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

返回
true if this object's PostLoad is thread safe

重载 UObject .

◆ PostLoad()

virtual void UMediaTexture::PostLoad ( )
overridevirtual

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

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ SetMediaPlayer()

void UMediaTexture::SetMediaPlayer ( UMediaPlayer *  NewMediaPlayer)

Set the media player that provides the video samples.

参数
NewMediaPlayerThe player to set.
参见
GetMediaPlayer

◆ TickResource()

void UMediaTexture::TickResource ( FTimespan  Timecode)
protected

Tick the texture resource.

参数
TimecodeThe current timecode.

类成员变量说明

◆ MediaPlayer

UMediaPlayer* UMediaTexture::MediaPlayer
protected

The media player asset associated with this texture.

This property is meant for design-time convenience. To change the associated media player at run-time, use the SetMediaPlayer method.

参见
SetMediaPlayer

该类的文档由以下文件生成: