FMediaSampleCache

Implements a cache for media samples.

Choose your operating system:

Windows

macOS

Linux

References

Module

MediaUtils

Header

/Engine/Source/Runtime/MediaUtils/Public/MediaSampleCache.h

Include

#include "MediaSampleCache.h"

Syntax

class FMediaSampleCache

Remarks

Implements a cache for media samples.

Constructors

Name Description

Public function

FMediaSampleCache()

Default constructor.

Functions

Name Description

Public function

void

 

Empty()

Empty the cache.

Public function

TSharedPtr< ...

 

GetAudioSample

(
    FTimespan Time
)

Get the audio sample for the specified play time.

Public function Const

void

 

GetCachedAudioSampleRanges

(
    TRangeSet< FTimespan >& OutTimeRan...
)

Get the time ranges of audio samples currently in the cache.

Public function Const

void

 

GetCachedVideoSampleRanges

(
    TRangeSet< FTimespan >& OutTimeRan...
)

Get the time ranges of video samples currently in the cache.

Public function

void

 

GetOverlaySamples

(
    FTimespan Time,
    TArray< TSharedPtr< IMediaOverlaySa...
)

Get the text overlay samples for the specified time.

Public function

TSharedPtr< ...

 

GetVideoSample

(
    FTimespan Time,
    bool Forward
)

Get the video sample for the specified play time.

Public function

void

 

SetCacheWindow

(
    FTimespan Ahead,
    FTimespan Behind
)

Set the time window of samples to cache.

Public function

void

 

Tick

(
    FTimespan DeltaTime,
    float Rate,
    FTimespan Time
)

Tick the cache.

Typedefs

Name

Description

TSampleSet

Template for sample cache sets.