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

◆ cleanup_expired_data()

void MayaFlux::Kriya::BufferPipeline::cleanup_expired_data ( )
private

Definition at line 306 of file BufferPipelineCapture.cpp.

307{
308 for (size_t i = 0; i < m_data_states.size(); ++i) {
310 if (i < m_operations.size() && m_operations[i].get_type() == BufferOperation::OpType::CAPTURE && m_operations[i].m_capture.get_mode() == BufferCapture::CaptureMode::TRANSIENT) {
311
312 if (m_operations[i].m_capture.m_data_expired_callback) {
313 auto it = m_operation_data.find(&m_operations[i]);
314 if (it != m_operation_data.end()) {
315 m_operations[i].m_capture.m_data_expired_callback(it->second, m_current_cycle);
316 }
317 }
318
320 } else {
322 }
323 }
324 }
325
326 auto it = m_operation_data.begin();
327 while (it != m_operation_data.end()) {
328 if (m_current_cycle > 2) {
329 it = m_operation_data.erase(it);
330 } else {
331 ++it;
332 }
333 }
334}
@ TRANSIENT
Single cycle capture (default) - data expires after 1 cycle.
@ CAPTURE
Capture data from source buffer using BufferCapture strategy.
std::unordered_map< BufferOperation *, Kakshya::DataVariant > m_operation_data
@ READY
Data ready for processing.
@ EXPIRED
Data has expired and should be cleaned up.
std::vector< BufferOperation > m_operations
std::vector< DataState > m_data_states

Referenced by finish_cycle().

+ Here is the caller graph for this function: