IMediaTextureSample

Interface for media texture samples.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Media

Header

/Engine/Source/Runtime/Media/Public/IMediaTextureSample.h

Include

#include "IMediaTextureSample.h"

Syntax

class IMediaTextureSample

Remarks

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.

Destructors

Name Description

Public function Virtual

~IMediaTextureSample()

Virtual destructor.

Functions

Name Description

Public function Virtual Const

double

 

GetAspectRatio()

Get pixel aspect ratio

Public function

const void &...

 

GetBuffer()

Get the sample's frame buffer.

Public function Const

FIntPoint

 

GetDim()

Get the width and height of the sample.

Public function Const

FTimespan

 

GetDuration()

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

Public function Const

EMediaTextur...

 

GetFormat()

Get the texture sample format.

Public function Virtual Const

uint8

 

GetNumMips()

Get the number of mips encoded in the sample

Public function Virtual Const

FLinearColor

 

GetOffset()

Get the Offset applied after ScaleRotation for the sample.

Public function Virtual Const

EMediaOrient...

 

GetOrientation()

Get image orientation vs. physically returned image data

Public function Const

FIntPoint

 

GetOutputDim()

Get the sample's desired output width and height.

Public function Virtual Const

FLinearColor

 

GetScaleRotation()

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

Public function Const

uint32

 

GetStride()

Get the horizontal stride (aka. pitch) of the sample's frame buffer.

Public function Const

FMediaTimeSt...

 

GetTime()

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

Public function Virtual Const

TOptional< F...

 

GetTimecode()

Get the sample timecode if available.

Public function Virtual Const

const FMatri...

 

GetYUVToRGBMatrix()

Get the YUV to RGB conversion matrix.

Public function Const

bool

 

IsCacheable()

Whether the sample can be held in a cache.

Public function Const

bool

 

IsOutputSrgb()

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

Public function Virtual

void

 

Reset()