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.
|
inlinevirtual |
Get pixel aspect ratio
|
pure virtual |
Get the sample's frame buffer.
The returned buffer is only valid for the life time of this sample.
|
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.
|
pure virtual |
|
pure virtual |
Get the texture sample format.
|
inlinevirtual |
Get the Offset applied after ScaleRotation for the sample.
|
inlinevirtual |
Get image orientation vs.
physically returned image data
|
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.
|
inlinevirtual |
Get the ScaleRotation (2x2 matrix) for the sample.
|
pure virtual |
Get the horizontal stride (aka.
pitch) of the sample's frame buffer.
|
pure virtual |
Get the sample time (in the player's local clock).
This value is used primarily for debugging purposes.
|
inlinevirtual |
Get the YUV to RGB conversion matrix.
Equivalent to MediaShaders::YuvToSrgbDefault Matrix.
|
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.
|
pure virtual |
Whether the output of the sample is in sRGB color space.