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

◆ cleanup_expired_data()

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

Definition at line 710 of file BufferPipeline.cpp.

711{
712 for (size_t i = 0; i < m_data_states.size(); ++i) {
714 if (i < m_operations.size() && m_operations[i].get_type() == BufferOperation::OpType::CAPTURE && m_operations[i].m_capture.get_mode() == BufferCapture::CaptureMode::TRANSIENT) {
715
716 if (m_operations[i].m_capture.m_data_expired_callback) {
717 auto it = m_operation_data.find(&m_operations[i]);
718 if (it != m_operation_data.end()) {
719 m_operations[i].m_capture.m_data_expired_callback(it->second, m_current_cycle);
720 }
721 }
722
724 } else {
726 }
727 }
728 }
729
730 auto it = m_operation_data.begin();
731 while (it != m_operation_data.end()) {
732 if (m_current_cycle > 2) {
733 it = m_operation_data.erase(it);
734 } else {
735 ++it;
736 }
737 }
738}
@ 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: