MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ ensure_capacity()

void MayaFlux::Kakshya::DynamicVideoStream::ensure_capacity ( uint64_t  frames)

Pre-allocate room for frames in linear mode.

Appends then reuse that storage instead of growing. Does nothing in circular mode, which allocates its ring up front.

Definition at line 147 of file DynamicVideoStream.cpp.

148{
149 if (is_ring_mode()) {
150 return;
151 }
152
153 Memory::SeqlockWriteGuard guard(m_data_lock);
154 flat_bytes().reserve(frames * get_frame_byte_size());
155}
bool is_ring_mode() const
True if the container is operating in ring mode.
size_t get_frame_byte_size() const
Total byte size of one frame: width * height * bytes_per_pixel.

References flat_bytes(), MayaFlux::Kakshya::VideoStreamContainer::get_frame_byte_size(), MayaFlux::Kakshya::VideoStreamContainer::is_ring_mode(), and MayaFlux::Kakshya::VideoStreamContainer::m_data_lock.

+ Here is the call graph for this function: