MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Buffers::BufferProcessingControl Class Reference

Processor attachment, removal, and processing chain management. More...

#include <BufferProcessingControl.hpp>

+ Collaboration diagram for MayaFlux::Buffers::BufferProcessingControl:

Public Member Functions

 BufferProcessingControl (TokenUnitManager &unit_manager, BufferAccessControl &access_control)
 Creates a new processing control handler.
 
 ~BufferProcessingControl ()=default
 
void add_processor (const std::shared_ptr< BufferProcessor > &processor, const std::shared_ptr< Buffer > &buffer, ProcessingToken token=ProcessingToken::AUDIO_BACKEND)
 Adds a processor to a buffer (dispatches based on buffer/token)
 
void add_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token, uint32_t channel)
 Adds a processor to a token (dispatches based on token)
 
void add_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Adds a processor to all channels in a token (dispatches based on token)
 
void remove_processor (const std::shared_ptr< BufferProcessor > &processor, const std::shared_ptr< Buffer > &buffer, ProcessingToken token=ProcessingToken::AUDIO_BACKEND)
 Removes a processor from a buffer (dispatches based on buffer/token)
 
void remove_processor_from_token (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token, uint32_t channel=0)
 Removes a processor from a token (dispatches based on token)
 
void set_final_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Sets a final processor for a token (dispatches based on token)
 
void add_audio_processor (const std::shared_ptr< BufferProcessor > &processor, const std::shared_ptr< AudioBuffer > &buffer)
 Adds a processor to a specific audio buffer.
 
void add_audio_processor_to_channel (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token, uint32_t channel)
 Adds a processor to a specific audio token and channel.
 
void add_audio_processor_to_token (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Adds a processor to all channels in an audio token.
 
void remove_audio_processor (const std::shared_ptr< BufferProcessor > &processor, const std::shared_ptr< AudioBuffer > &buffer)
 Removes a processor from a specific audio buffer.
 
void remove_audio_processor_from_channel (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token, uint32_t channel)
 Removes a processor from a specific audio token and channel.
 
void remove_audio_processor_from_token (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Removes a processor from all channels in an audio token.
 
void set_audio_final_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Sets a final processor for an audio token (applied to all channels)
 
std::shared_ptr< BufferProcessorattach_quick_process (BufferProcessingFunction processor, const std::shared_ptr< Buffer > &buffer, ProcessingToken token=ProcessingToken::AUDIO_BACKEND)
 Creates and attaches a quick processing function to buffer.
 
std::shared_ptr< BufferProcessorattach_quick_process (BufferProcessingFunction processor, ProcessingToken token, uint32_t channel)
 Creates and attaches a quick processing function to an audio token/channel.
 
std::shared_ptr< BufferProcessorattach_quick_process (BufferProcessingFunction processor, ProcessingToken token)
 Creates and attaches a quick processing function to all channels in a token.
 
void connect_node_to_audio_channel (const std::shared_ptr< Nodes::Node > &node, ProcessingToken token, uint32_t channel, float mix=0.5F, bool clear_before=false)
 Connects a node to a specific audio token and channel.
 
void connect_node_to_audio_buffer (const std::shared_ptr< Nodes::Node > &node, const std::shared_ptr< AudioBuffer > &buffer, float mix=0.5F, bool clear_before=true)
 Connects a node directly to a specific audio buffer.
 
void add_graphics_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Adds a processor to the graphics processing chain.
 
void add_graphics_processor (const std::shared_ptr< BufferProcessor > &processor, const std::shared_ptr< class Buffer > &buffer, ProcessingToken token)
 Adds a processor to a specific graphics buffer.
 
void set_graphics_final_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Sets a final processor for the graphics processing chain.
 
void remove_graphics_processor (const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token)
 Removes a processor from the graphics processing chain.
 

Private Attributes

TokenUnitManagerm_unit_manager
 Reference to the token/unit manager.
 
BufferAccessControlm_access_control
 Reference to the buffer access control.
 

Detailed Description

Processor attachment, removal, and processing chain management.

Manages all operations related to adding/removing processors to buffers and processing chains. Handles processor routing for different tokens, processor lifecycle (quick processes), and node-to-buffer connections.

Design Principles:

  • Token-aware: Routes processors to appropriate token chains
  • Domain-agnostic: Works with any token's processing chains
  • Single responsibility: Only handles processor management, not access/input
  • Delegates to TokenUnitManager and BufferAccessControl for underlying operations

This class centralizes all processor-related logic that was scattered throughout the original BufferManager.

Definition at line 34 of file BufferProcessingControl.hpp.


The documentation for this class was generated from the following files: