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

◆ process_non_owning()

void MayaFlux::Buffers::BufferProcessingChain::process_non_owning ( const std::shared_ptr< Buffer > &  buffer)
private

Internal processing method for non-owning buffer contexts.

Parameters
bufferBuffer to process

This method is used internally by BufferProcessingChain to process buffers that are not owned by the chain itself. It ensures that the processor's processing function is called in a thread-safe manner, managing the active processing state to prevent concurrent access issues.

Definition at line 146 of file BufferProcessingChain.cpp.

147{
148 if (m_pending_count.load(std::memory_order_relaxed) > 0) {
150 }
151
152 auto it = m_buffer_processors.find(buffer);
153 if (it == m_buffer_processors.end() || it->second.empty()) {
154 return;
155 }
156
157 for (auto& processor : it->second) {
158 bool should_process = true;
159
161 auto processor_token = processor->get_processing_token();
162 should_process = are_tokens_compatible(m_token_filter_mask, processor_token);
163 }
164
165 if (should_process) {
166 processor->process_non_owning(buffer);
167 }
168 }
169
172 }
173}
std::shared_ptr< NetworkGeometryBuffer > buffer
ProcessingToken m_token_filter_mask
Preferred processing token for this chain.
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< BufferProcessor > > > m_buffer_processors
Map of buffers to their processor sequences.
void cleanup_rejected_processors(const std::shared_ptr< Buffer > &buffer)
Validates the processing token against the chain's preferred token.
void process_pending_processor_operations()
Process pending processor operations.
TokenEnforcementStrategy m_enforcement_strategy
Token enforcement strategy for this chain.
bool are_tokens_compatible(ProcessingToken preferred, ProcessingToken current)
Determines if two processing tokens are compatible for joint execution.
@ OVERRIDE_SKIP
Allows token overrides but skips processing for incompatible operations.
@ OVERRIDE_REJECT
Allows token overrides but rejects incompatible processors from chains.

References MayaFlux::Buffers::are_tokens_compatible(), buffer, cleanup_rejected_processors(), m_buffer_processors, m_enforcement_strategy, m_pending_count, m_token_filter_mask, MayaFlux::Buffers::OVERRIDE_REJECT, MayaFlux::Buffers::OVERRIDE_SKIP, and process_pending_processor_operations().

+ Here is the call graph for this function: