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

◆ cleanup_expired_data()

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

Definition at line 666 of file BufferPipeline.cpp.

667{
668 for (size_t i = 0; i < m_data_states.size(); ++i) {
670 if (i < m_operations.size() && m_operations[i].get_type() == BufferOperation::OpType::CAPTURE && m_operations[i].m_capture.get_mode() == BufferCapture::CaptureMode::TRANSIENT) {
671
672 if (m_operations[i].m_capture.m_data_expired_callback) {
673 auto it = m_operation_data.find(&m_operations[i]);
674 if (it != m_operation_data.end()) {
675 m_operations[i].m_capture.m_data_expired_callback(it->second, m_current_cycle);
676 }
677 }
678
680 } else {
682 }
683 }
684 }
685
686 auto it = m_operation_data.begin();
687 while (it != m_operation_data.end()) {
688 if (m_current_cycle > 2) {
689 it = m_operation_data.erase(it);
690 } else {
691 ++it;
692 }
693 }
694}
@ 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

References MayaFlux::Kriya::BufferOperation::CAPTURE, CONSUMED, EXPIRED, m_current_cycle, m_data_states, m_operation_data, m_operations, READY, and MayaFlux::Kriya::BufferCapture::TRANSIENT.

Referenced by execute_phased(), and execute_streaming().

+ Here is the caller graph for this function: