Navigation
Unreal Engine C++ API Reference > Runtime > Media
Inheritance Hierarchy
- IMediaTextureSample
- FMediaIOCoreTextureSampleBase
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
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Virtual destructor. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
double | Get pixel aspect ratio | |
![]() |
const void * | GetBuffer () |
Get the sample's frame buffer. |
![]() ![]() |
FIntPoint | GetDim () |
Get the width and height of the sample. |
![]() ![]() ![]() |
TOptional< UE::Color::FColorSpace > | Get display mastering color space | |
![]() ![]() ![]() |
bool | GetDisplayMasteringLuminance
(
float& OutMin, |
Get display mastering luminance information |
![]() ![]() ![]() |
FVector2d | ||
![]() ![]() ![]() |
FVector2d | ||
![]() ![]() ![]() |
FVector2d | ||
![]() ![]() |
FTimespan | GetDuration () |
Get the amount of time for which the sample is valid. |
![]() ![]() ![]() |
UE::Color::EEncoding | Get EOTF / "Gamma" / encoding type of data | |
![]() ![]() |
EMediaTextureSampleFormat | GetFormat () |
Get the texture sample format. |
![]() ![]() ![]() |
TOptional< FFrameRate > | GetFramerate () |
Get the sample framerate if available. |
![]() ![]() ![]() |
bool | GetFullRange () |
Get full range color flag |
![]() ![]() ![]() |
FMatrix44d | ||
![]() ![]() ![]() |
float | Get factor to normalize data from nits to scene color values | |
![]() ![]() ![]() |
bool | GetMaxLuminanceLevels
(
uint16& OutCLL, |
Get maximum luminance information |
![]() ![]() ![]() |
uint8 | GetNumMips () |
Get the number of mips encoded in the sample |
![]() ![]() ![]() |
FLinearColor | GetOffset () |
Get the Offset applied after ScaleRotation for the sample. |
![]() ![]() ![]() |
EMediaOrientation | Get image orientation vs. physically returned image data | |
![]() ![]() |
FIntPoint | GetOutputDim () |
Get the sample's desired output width and height. |
![]() ![]() ![]() |
FMatrix44f | Get complete 4x4 matrix to apply to the sample's pixels to yield RGB data in the sample's gamut | |
![]() ![]() ![]() |
FLinearColor | Get the ScaleRotation (2x2 matrix) for the sample. | |
![]() ![]() ![]() |
const UE::Color::FColorSpace & | Get sample source color space (defaults to the sRGB/Rec709 gamut) | |
![]() ![]() |
uint32 | GetStride () |
Get the horizontal stride (aka. pitch) of the sample's frame buffer. |
![]() ![]() ![]() |
FMediaTextureTilingDescription | Get tile information (number, size and border size) of the sample. | |
![]() ![]() |
FMediaTimeStamp | GetTime () |
Get the sample time (in the player's local clock). |
![]() ![]() ![]() |
TOptional< FTimecode > | GetTimecode () |
Get the sample timecode if available. |
![]() ![]() ![]() |
MediaShaders::EToneMapMethod | Get an optional tonemapping method, for application on HDR inputs. | |
![]() ![]() ![]() |
FVector2d | ||
![]() ![]() ![]() |
const FMatrix & | Get the YUV to RGB conversion matrix. | |
![]() ![]() |
bool | IsCacheable () |
Whether the sample can be held in a cache. |
![]() ![]() |
bool | IsOutputSrgb () |
Whether the output of the sample is in sRGB color space. |
![]() ![]() |
void | Reset () |
Reset sample to empty state |
![]() ![]() ![]() |
bool | Whether samples should be converted based on a mismatch with the working color space. |