FMediaSampleCache::GetVideoSample

Get the video sample for the specified play time.

Windows
MacOS
Linux

References

Module

MediaUtils

Header

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

Include

#include "MediaSampleCache.h"

Source

/Engine/Source/Runtime/MediaUtils/Private/MediaSampleCache.cpp

Syntax

TSharedPtr< IMediaTextureSample, ESPMode::ThreadSafe > GetVideoSample
(
    FTimespan Time,
    bool Forward
)

Remarks

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.

Returns

The sample, or nullptr if no sample available.

Parameters

Parameter

Description

Time

The time to get the sample for (in the player's clock).

Forward

Whether the play direction is forward (true) or backward (false).

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss