engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IMediaTextureSample类 参考abstract

Interface for media texture samples. 更多...

#include <IMediaTextureSample.h>

Public 成员函数

virtual double GetAspectRatio () const
 Get pixel aspect ratio 更多...
 
virtual const void * GetBuffer ()=0
 Get the sample's frame buffer. 更多...
 
virtual FIntPoint GetDim () const =0
 Get the width and height of the sample. 更多...
 
virtual FTimespan GetDuration () const =0
 Get the amount of time for which the sample is valid. 更多...
 
virtual EMediaTextureSampleFormat GetFormat () const =0
 Get the texture sample format. 更多...
 
virtual FLinearColor GetOffset () const
 Get the Offset applied after ScaleRotation for the sample. 更多...
 
virtual EMediaOrientation GetOrientation () const
 Get image orientation vs. 更多...
 
virtual FIntPoint GetOutputDim () const =0
 Get the sample's desired output width and height. 更多...
 
virtual FLinearColor GetScaleRotation () const
 Get the ScaleRotation (2x2 matrix) for the sample. 更多...
 
virtual uint32 GetStride () const =0
 Get the horizontal stride (aka. 更多...
 
virtual FMediaTimeStamp GetTime () const =0
 Get the sample time (in the player's local clock). 更多...
 
virtual TOptional< FTimecode > GetTimecode () const
 Get the sample timecode if available. 更多...
 
virtual const FMatrix & GetYUVToRGBMatrix () const
 Get the YUV to RGB conversion matrix. 更多...
 
virtual bool IsCacheable () const =0
 Whether the sample can be held in a cache. 更多...
 
virtual bool IsOutputSrgb () const =0
 Whether the output of the sample is in sRGB color space. 更多...
 
virtual ~IMediaTextureSample ()
 Virtual destructor.
 

详细描述

Interface for media texture samples.

Media texture samples are generated by media players and sent to the registered media texture sink. They contain a single frame of texture data along with extra metadata, such as dimensions, time codes, and durations.

Depending on the decoder, a frame's pixel data may be stored in a CPU memory buffer, or in an RHI texture resource (only available when compiling against the Engine). The media texture sample API supports both models via the GetBuffer and the GetTexture methods. Sample instances need to implement only one of these.

成员函数说明

◆ GetAspectRatio()

virtual double IMediaTextureSample::GetAspectRatio ( ) const
inlinevirtual

Get pixel aspect ratio

返回
Pixel aspect ratio

◆ GetBuffer()

virtual const void * IMediaTextureSample::GetBuffer ( )
pure virtual

Get the sample's frame buffer.

The returned buffer is only valid for the life time of this sample.

返回
Buffer containing the texels, or nullptr if the sample holds an FTexture.
参见
GetDim, GetDuration, GetFormat, GetOutputDim, GetStride, GetTexture, GetTime

◆ GetDim()

virtual FIntPoint IMediaTextureSample::GetDim ( ) const
pure virtual

Get the width and height of the sample.

The sample may be larger than the output dimensions, because of horizontal or vertical padding required by some formats.

返回
Buffer dimensions (in texels).
参见
GetBuffer, GetDuration, GetFormat, GetOutputDim, GetStride, GetTexture, GetTime

◆ GetDuration()

virtual FTimespan IMediaTextureSample::GetDuration ( ) const
pure virtual

Get the amount of time for which the sample is valid.

A duration of zero indicates that the sample is valid until the timecode of the next sample in the queue.

返回
Sample duration.
参见
GetBuffer, GetDim, GetFormat, GetOutputDim, GetStride, GetTexture, GetTime

◆ GetFormat()

virtual EMediaTextureSampleFormat IMediaTextureSample::GetFormat ( ) const
pure virtual

Get the texture sample format.

返回
Sample format.
参见
GetBuffer, GetDim, GetDuration, GetOutputDim, GetStride, GetTexture, GetTime

◆ GetOffset()

virtual FLinearColor IMediaTextureSample::GetOffset ( ) const
inlinevirtual

Get the Offset applied after ScaleRotation for the sample.

返回
FLinearColor with xy = offset, zw must be zero
注解
For use with "external image" style output only

◆ GetOrientation()

virtual EMediaOrientation IMediaTextureSample::GetOrientation ( ) const
inlinevirtual

Get image orientation vs.

physically returned image data

返回
Image orientation

◆ GetOutputDim()

virtual FIntPoint IMediaTextureSample::GetOutputDim ( ) const
pure virtual

Get the sample's desired output width and height.

The output dimensions may be smaller than the frame buffer dimensions, because of horizontal and/or vertical padding that may be required for some formats.

返回
Output dimensions (in pixels).
参见
GetBuffer, GetDim, GetDuration, GetFormat, GetStride, GetTexture, GetTime

◆ GetScaleRotation()

virtual FLinearColor IMediaTextureSample::GetScaleRotation ( ) const
inlinevirtual

Get the ScaleRotation (2x2 matrix) for the sample.

返回
FLinearColor with xy = row 0 (dotted with U), zw = row 1 (dotted with V)
注解
For use with "external image" style output only. Use GetOrientation() otherwise

◆ GetStride()

virtual uint32 IMediaTextureSample::GetStride ( ) const
pure virtual

Get the horizontal stride (aka.

pitch) of the sample's frame buffer.

返回
The buffer stride (in number of bytes).
参见
GetBuffer, GetDim, GetDuration, GetFormat, GetOutputDim, GetTexture, GetTime

◆ GetTime()

virtual FMediaTimeStamp IMediaTextureSample::GetTime ( ) const
pure virtual

Get the sample time (in the player's local clock).

This value is used primarily for debugging purposes.

返回
Sample time.
参见
GetBuffer, GetDim, GetDuration, GetFormat, GetOutputDim, GetStride, GetTexture

◆ GetTimecode()

virtual TOptional< FTimecode > IMediaTextureSample::GetTimecode ( ) const
inlinevirtual

Get the sample timecode if available.

返回
Sample timecode.
参见
GetTime

◆ GetYUVToRGBMatrix()

virtual const FMatrix & IMediaTextureSample::GetYUVToRGBMatrix ( ) const
inlinevirtual

Get the YUV to RGB conversion matrix.

Equivalent to MediaShaders::YuvToSrgbDefault Matrix.

返回
Conversion Matrix

◆ IsCacheable()

virtual bool IMediaTextureSample::IsCacheable ( ) const
pure virtual

Whether the sample can be held in a cache.

Non-cacheable video samples become invalid when the next sample is available, and only the latest sample should be kept by video sample consumers.

返回
true if cacheable, false otherwise.

◆ IsOutputSrgb()

virtual bool IMediaTextureSample::IsOutputSrgb ( ) const
pure virtual

Whether the output of the sample is in sRGB color space.

返回
true if sRGB, false otherwise.

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