Navigation
API > API/Runtime > API/Runtime/MediaUtils
Implements a cache for media samples.
| Name | FMediaSampleCache |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaUtils/Public/MediaSampleCache.h |
| Include Path | #include "MediaSampleCache.h" |
Syntax
class FMediaSampleCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMediaSampleCache() |
Default constructor. | MediaSampleCache.h |
Structs
| Name | Remarks |
|---|---|
| TSampleKeyFuncs | Key functions template for the sample cache sets. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TSampleSet | TSet< TSharedPtr< SampleType, ESPMode::ThreadSafe >, TSampleKeyFuncs< SampleType > > | Template for sample cache sets. | MediaSampleCache.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AudioSamples | TSampleSet< IMediaAudioSample > | Cached audio samples. | MediaSampleCache.h | |
| CacheAhead | FTimespan | MediaSampleCache.h | ||
| CacheBehind | FTimespan | MediaSampleCache.h | ||
| CriticalSection | FCriticalSection | Synchronizes access to sample collections. | MediaSampleCache.h | |
| MetadataSamples | TSampleSet< IMediaBinarySample > | Cached metadata samples. | MediaSampleCache.h | |
| OverlaySamples | TSampleSet< IMediaOverlaySample > | Cached overlay samples. | MediaSampleCache.h | |
| VideoSamples | TSampleSet< IMediaTextureSample > | Cached video samples. | MediaSampleCache.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Empty () |
Empty the cache. | MediaSampleCache.h | |
| Get the audio sample for the specified play time. | MediaSampleCache.h | ||
void GetCachedAudioSampleRanges
(
TRangeSet< FTimespan >& OutTimeRanges |
Get the time ranges of audio samples currently in the cache. | MediaSampleCache.h | |
void GetCachedVideoSampleRanges
(
TRangeSet< FTimespan >& OutTimeRanges |
Get the time ranges of video samples currently in the cache. | MediaSampleCache.h | |
void GetOverlaySamples
(
FTimespan Time, |
Get the text overlay samples for the specified time. | MediaSampleCache.h | |
TSharedPtr< IMediaTextureSample, ESPMode::ThreadSafe > GetVideoSample
(
FTimespan Time, |
Get the video sample for the specified play time. | MediaSampleCache.h | |
| Set the time window of samples to cache. | MediaSampleCache.h | ||
| Tick the cache. | MediaSampleCache.h |