Skip to main content

Module pool

Module pool 

Source
Expand description

Frame pool for memory reuse.

This module provides the SimpleFramePool which enables memory pooling for decoded frames, reducing allocation overhead during video playback.

§Examples

use ff_decode::SimpleFramePool;

// Create a decoder with a simple frame pool (automatically initialized)
let pool = SimpleFramePool::new(32);
let decoder = VideoDecoder::open("video.mp4")?
    .frame_pool(pool)
    .build()?;

Structs§

PooledBuffer
A buffer acquired from a FramePool.
SimpleFramePool
A simple frame pool implementation with fixed capacity.

Traits§

FramePool
A trait for frame buffer pooling.