Navigation
API > API/Runtime > API/Runtime/MediaUtils > API/Runtime/MediaUtils/FMediaSampleCache
Description
Get the video sample for the specified play time.
This method will return the closest match for the given time code. If the current play rate is positive, the closest sample with an equal or older time is returned. If the current rate is negative, the closest sample with an equal or newer time is returned.
| Name | GetVideoSample |
| Type | function |
| Header File | /Engine/Source/Runtime/MediaUtils/Public/MediaSampleCache.h |
| Include Path | #include "MediaSampleCache.h" |
| Source | /Engine/Source/Runtime/MediaUtils/Private/MediaSampleCache.cpp |
TSharedPtr < IMediaTextureSample , ESPMode::ThreadSafe > GetVideoSample
(
FTimespan Time,
bool Forward
)
The sample, or nullptr if no sample available.
Parameters
| Name | Remarks |
|---|---|
| Time | The time to get the sample for (in the player's clock). |
| Forward | Whether the play direction is forward (true) or backward (false). |