Navigation
API > API/Plugins > API/Plugins/ImgMedia
A global cache for all ImgMedia players.
Uses Least Recently Used (LRU).
| Name | FImgMediaGlobalCache |
| Type | class |
| Header File | /Engine/Plugins/Media/ImgMedia/Source/ImgMedia/Public/ImgMediaGlobalCache.h |
| Include Path | #include "ImgMediaGlobalCache.h" |
Syntax
class FImgMediaGlobalCache : public TSharedFromThis< FImgMediaGlobalCache, ESPMode::ThreadSafe >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FImgMediaGlobalCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FImgMediaGlobalCache() |
Constructor. | ImgMediaGlobalCache.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FImgMediaGlobalCache() |
Desctructor. | ImgMediaGlobalCache.h |
Structs
| Name | Remarks |
|---|---|
| FImgMediaGlobalCacheEntry | An entry in the cache. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CriticalSection | FCriticalSection | Critical section for synchronizing access to Frames. | ImgMediaGlobalCache.h | |
| CurrentSize | SIZE_T | Current size of the cache in bytes. | ImgMediaGlobalCache.h | |
| LeastRecent | FImgMediaGlobalCacheEntry * | Entry that was used first. | ImgMediaGlobalCache.h | |
| MapFileToIndex | TMap< FString, int32 > | Maps a file name to the index of that file in the sequence. | ImgMediaGlobalCache.h | |
| MapFrameToEntry | TMap< TPair< FName, int32 >, FImgMediaGlobalCacheEntry * > | Maps a sequence name and frame index to an entry in the cache. | ImgMediaGlobalCache.h | |
| MapLeastRecentToSequence | TMap< FImgMediaGlobalCacheEntry *, FName > | Maps a cache entry that is the least recent entry to the name of its sequence. | ImgMediaGlobalCache.h | |
| MapSequenceToMostRecentEntry | TMap< FName, FImgMediaGlobalCacheEntry * > | Maps a sequence name to the most recent cache entry of that sequence. | ImgMediaGlobalCache.h | |
| MapSequenceToWatcher | TMap< FString, FDelegateHandle > | Maps a sequence directory to a directory watcher. | ImgMediaGlobalCache.h | |
| MaxSize | SIZE_T | Maximum size of the cache in bytes. | ImgMediaGlobalCache.h | |
| MostRecent | FImgMediaGlobalCacheEntry * | Entry that was used last. | ImgMediaGlobalCache.h | |
| UpdateSettingsDelegateHandle | FDelegateHandle | Handle to registered UpdateSettings delegate. | ImgMediaGlobalCache.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddFrame
(
const FString& FileName, |
Adds a frame to the cache. | ImgMediaGlobalCache.h | |
bool Contains
(
const FName& Sequence, |
Check whether the entry with the specified sequence and index is present. | ImgMediaGlobalCache.h | |
void EmptyCache() |
Empties the cache. | ImgMediaGlobalCache.h | |
TSharedPtr< FImgMediaFrame, ESPMode::ThreadSafe > * FindAndTouch
(
const FName& Sequence, |
Find the entry with the specified sequence and index and mark it as the most recently used. | ImgMediaGlobalCache.h | |
SIZE_T GetCurrentSize() |
Get the current size (in bytess). | ImgMediaGlobalCache.h | |
| Find the indices of all cached entries of a particular sequence. | ImgMediaGlobalCache.h | ||
SIZE_T GetMaxSize() |
Get the maximum size (in bytes). | ImgMediaGlobalCache.h | |
void Initialize() |
Initialize the cache. | ImgMediaGlobalCache.h | |
void Shutdown() |
Shut down the cache. | ImgMediaGlobalCache.h |