|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Fundamental unit of operation in buffer processing pipelines. More...
#include <BufferOperation.hpp>
Collaboration diagram for MayaFlux::Kriya::BufferOperation:Public Types | |
| enum class | OpType : uint8_t { CAPTURE , TRANSFORM , ROUTE , LOAD , SYNC , CONDITION , BRANCH , DISPATCH , FUSE , MODIFY } |
| Defines the fundamental operation types in the processing pipeline. More... | |
Public Member Functions | |
| BufferOperation & | with_priority (uint8_t priority) |
| Set execution priority for scheduler ordering. | |
| BufferOperation & | on_token (Buffers::ProcessingToken token) |
| Set processing token for execution context. | |
| BufferOperation & | every_n_cycles (uint32_t n) |
| Set cycle interval for periodic execution. | |
| BufferOperation & | with_tag (const std::string &tag) |
| Assign identification tag. | |
| BufferOperation & | for_cycles (uint32_t count) |
| OpType | get_type () const |
| Getters for internal state (read-only) | |
| uint8_t | get_priority () const |
| Getters for internal state (read-only) | |
| Buffers::ProcessingToken | get_token () const |
| Getters for processing token. | |
| const std::string & | get_tag () const |
| Getters for user defined tag. | |
| BufferOperation & | as_capture_phase () |
| Hint that this operation should execute in capture phase. | |
| BufferOperation & | as_process_phase () |
| Hint that this operation should execute in process phase. | |
| BufferOperation & | as_streaming () |
| Mark this operation as streaming (executes continuously) Useful for modify_buffer and similar stateful operations. | |
| bool | is_streaming () const |
| Check if this operation is a streaming operation. | |
| ExecutionPhase | get_execution_phase () const |
| Get the execution phase hint for this operation. | |
| BufferOperation (OpType type, BufferCapture capture) | |
| BufferOperation (OpType type) | |
Static Public Member Functions | |
| static BufferOperation | capture (BufferCapture capture) |
| Create a capture operation using BufferCapture configuration. | |
| static BufferOperation | capture_input (const std::shared_ptr< Buffers::BufferManager > &buffer_manager, uint32_t input_channel, BufferCapture::CaptureMode mode=BufferCapture::CaptureMode::ACCUMULATE, uint32_t cycle_count=0) |
| Create capture operation from input channel using convenience API. | |
| static CaptureBuilder | capture_input_from (const std::shared_ptr< Buffers::BufferManager > &buffer_manager, uint32_t input_channel) |
| Create CaptureBuilder for input channel with fluent configuration. | |
| static BufferOperation | capture_file (const std::string &filepath, uint32_t channel=0, uint32_t cycle_count=0) |
| Create a file capture operation that reads from file and stores in stream. | |
| static CaptureBuilder | capture_file_from (const std::string &filepath, uint32_t channel=0) |
| Create CaptureBuilder for file with fluent configuration. | |
| static BufferOperation | file_to_stream (const std::string &filepath, std::shared_ptr< Kakshya::DynamicSoundStream > target_stream, uint32_t cycle_count=0) |
| Create operation to route file data to DynamicSoundStream. | |
| static BufferOperation | transform (TransformationFunction transformer) |
| Create a transform operation with custom transformation function. | |
| static BufferOperation | route_to_buffer (std::shared_ptr< Buffers::AudioBuffer > target) |
| Create a routing operation to AudioBuffer destination. | |
| static BufferOperation | route_to_container (std::shared_ptr< Kakshya::DynamicSoundStream > target) |
| Create a routing operation to DynamicSoundStream destination. | |
| static BufferOperation | load_from_container (std::shared_ptr< Kakshya::DynamicSoundStream > source, std::shared_ptr< Buffers::AudioBuffer > target, uint64_t start_frame=0, uint32_t length=0) |
| Create a load operation from container to buffer. | |
| static BufferOperation | when (std::function< bool(uint32_t)> condition) |
| Create a conditional operation for pipeline branching. | |
| static BufferOperation | dispatch_to (OperationFunction handler) |
| Create a dispatch operation for external processing. | |
| static BufferOperation | modify_buffer (std::shared_ptr< Buffers::AudioBuffer > buffer, Buffers::BufferProcessingFunction modifier) |
| Create a modify operation for direct buffer manipulation. | |
| static BufferOperation | fuse_data (std::vector< std::shared_ptr< Buffers::AudioBuffer > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Buffers::AudioBuffer > target) |
| Create a fusion operation for multiple AudioBuffer sources. | |
| static BufferOperation | fuse_containers (std::vector< std::shared_ptr< Kakshya::DynamicSoundStream > > sources, TransformVectorFunction fusion_func, std::shared_ptr< Kakshya::DynamicSoundStream > target) |
| Create a fusion operation for multiple DynamicSoundStream sources. | |
| static CaptureBuilder | capture_from (std::shared_ptr< Buffers::AudioBuffer > buffer) |
| Create a CaptureBuilder for fluent capture configuration. | |
| static bool | is_capture_phase_operation (const BufferOperation &op) |
| static bool | is_process_phase_operation (const BufferOperation &op) |
Private Types | |
| enum class | ExecutionPhase : uint8_t { AUTO , CAPTURE , PROCESS } |
Private Attributes | |
| ExecutionPhase | m_execution_phase { ExecutionPhase::AUTO } |
| OpType | m_type |
| BufferCapture | m_capture |
| uint32_t | m_modify_cycle_count {} |
| bool | m_is_streaming {} |
| TransformationFunction | m_transformer |
| Buffers::BufferProcessingFunction | m_buffer_modifier |
| std::shared_ptr< Buffers::AudioBuffer > | m_target_buffer |
| std::shared_ptr< Kakshya::DynamicSoundStream > | m_target_container |
| std::shared_ptr< Buffers::BufferProcessor > | m_attached_processor |
| std::shared_ptr< Kakshya::DynamicSoundStream > | m_source_container |
| uint64_t | m_start_frame {} |
| uint32_t | m_load_length {} |
| std::function< bool(uint32_t)> | m_condition |
| OperationFunction | m_dispatch_handler |
| std::vector< std::shared_ptr< Buffers::AudioBuffer > > | m_source_buffers |
| std::vector< std::shared_ptr< Kakshya::DynamicSoundStream > > | m_source_containers |
| TransformVectorFunction | m_fusion_function |
| uint8_t | m_priority = 128 |
| Buffers::ProcessingToken | m_token = Buffers::ProcessingToken::AUDIO_BACKEND |
| uint32_t | m_cycle_interval = 1 |
| std::string | m_tag |
Friends | |
| class | BufferPipeline |
Fundamental unit of operation in buffer processing pipelines.
BufferOperation encapsulates discrete processing steps that can be composed into complex data flow pipelines. Each operation represents a specific action such as capturing data, transforming it, routing to destinations, or applying conditional logic. Operations are designed to be chainable and support sophisticated scheduling and priority management.
Operation Types:
Example Usage:
Definition at line 136 of file BufferOperation.hpp.