class BufferPool
Defined at line 20 of file ../../src/media/codec/codecs/sw/buffer_pool.h
BufferPool manages CodecBuffers for use with local output types in software
encoders.
Public Methods
void AddBuffer (const CodecBuffer * buffer)
Defined at line 7 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
const CodecBuffer * AllocateBuffer (size_t alloc_len)
Allocates a buffer for the caller and remembers the allocation size.
Defined at line 12 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
void FreeBuffer (uint8_t * base)
Frees a buffer by its base address, releasing it back to the pool.
Defined at line 30 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
std::optional<Allocation> FindBufferByBase (uint8_t * base)
Looks up what buffer from the pool backs a frame Ffmpeg has output.
Defined at line 43 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
void Reset (bool keep_data)
Removes all free buffers and re-arms the buffer pool to block when
servicing allocation requests.
If keep_data is true, does not modify the tracking for buffers already in
use.
If keep_data is false, old buffers are forgotten, and it's up to client
code to avoid calling FreeBuffer() regarding any old buffer.
Defined at line 52 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
void StopAllWaits ()
Stop blocking for new buffers when empty.
Defined at line 60 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc
bool has_buffers_in_use ()
Returns whether any buffers in the pool are currently allocated.
Defined at line 62 of file ../../src/media/codec/codecs/vaapi/buffer_pool.cc