Navigation
API > API/Runtime > API/Runtime/MediaUtils
Template for media object pools.
Poolable objects are required to implement the IMediaPoolable interface.
| Name | TMediaObjectPool |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaUtils/Public/MediaObjectPool.h |
| Include Path | #include "MediaObjectPool.h" |
Syntax
template<typename ObjectType, typename ObjectAllocator>
class TMediaObjectPool
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMediaObjectPool
(
ObjectAllocator* ObjectAllocatorInstance |
Default constructor. | MediaObjectPool.h | |
TMediaObjectPool
(
uint32 NumReserve |
Create and initialize a new instance. | MediaObjectPool.h |
Classes
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Storage | TSharedRef< TStorage, ESPMode::ThreadSafe > | Storage for pooled objects. | MediaObjectPool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ObjectType * Acquire
(
bool bAlloc |
Acquire an untracked object from the pool. | MediaObjectPool.h | |
TSharedRef< ObjectType, ESPMode::ThreadSafe > AcquireShared () |
Acquire a shared object from the pool. | MediaObjectPool.h | |
TSharedPtr< ObjectType, ESPMode::ThreadSafe > AcquireShared
(
bool bAlloc |
Acquire a shared object from the pool. | MediaObjectPool.h | |
int32 Num() |
Get the number of objects available in the pool. | MediaObjectPool.h | |
void Release
(
ObjectType* Object |
Return the given object to the pool. | MediaObjectPool.h | |
void Reset
(
uint32 NumObjects |
Reset the pool and reserve a specified number of objects. | MediaObjectPool.h | |
void Tick() |
Regular tick call | MediaObjectPool.h | |
TSharedRef< ObjectType, ESPMode::ThreadSafe > ToShared
(
ObjectType* Object |
Convert an object to a shared pooled object. | MediaObjectPool.h |