memorypool: implemented arenas
A pool can allocate/destroy any amount of arenas during runtime, meaning it won't run out of memory but we still get the advantages of one large allocation as opposed to hundreds of small allocations.
This commit is contained in:
@@ -30,12 +30,13 @@ OLIVE_NAMESPACE_ENTER
|
||||
class FFmpegFramePool : public MemoryPool<uint8_t>
|
||||
{
|
||||
public:
|
||||
FFmpegFramePool();
|
||||
FFmpegFramePool(int element_count,
|
||||
int width,
|
||||
int height,
|
||||
AVPixelFormat format);
|
||||
|
||||
ElementPtr Get(AVFrame* copy);
|
||||
|
||||
void SetParams(int width, int height, AVPixelFormat format);
|
||||
|
||||
protected:
|
||||
virtual size_t GetElementSize() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user