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 724 of file BufferPipeline.cpp.

725{
726 for (size_t i = 0; i < m_data_states.size(); ++i) {
728 if (i < m_operations.size() && m_operations[i].get_type() == BufferOperation::OpType::CAPTURE && m_operations[i].m_capture.get_mode() == BufferCapture::CaptureMode::TRANSIENT) {
729
730 if (m_operations[i].m_capture.m_data_expired_callback) {
731 auto it = m_operation_data.find(&m_operations[i]);
732 if (it != m_operation_data.end()) {
733 m_operations[i].m_capture.m_data_expired_callback(it->second, m_current_cycle);
734 }
735 }
736
738 } else {
740 }
741 }
742 }
743
744 auto it = m_operation_data.begin();
745 while (it != m_operation_data.end()) {
746 if (m_current_cycle > 2) {
747 it = m_operation_data.erase(it);
748 } else {
749 ++it;
750 }
751 }
752}
@ 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: