Skip to main content

Module pool

Module pool 

Source

Structs§

UnboundObjectPool
A growable pool of reusable Ts — lets a frame-producing element (see crate::elements::SwDecoder, crate::elements::Scaler) hand out the same buffers over and over instead of allocating a fresh one (and freeing the old one) every single frame. Reusing an already-allocated ffmpeg_next::frame::Video also lets ffmpeg’s own avcodec_receive_frame/sws_scale skip their internal buffer allocation when the reused frame already matches — not just savings on this crate’s side.
UnboundObjectPoolRef
One item borrowed from an UnboundObjectPoolDeref/DerefMut to T for normal use, and returns itself to the pool (after running release on it) when dropped.