|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Data-driven interface for managing arbitrary processable signal sources. More...
#include <SignalSourceContainer.hpp>
Inheritance diagram for MayaFlux::Kakshya::SignalSourceContainer:
Collaboration diagram for MayaFlux::Kakshya::SignalSourceContainer:Public Member Functions | |
| ~SignalSourceContainer () override=default | |
| virtual ProcessingState | get_processing_state () const =0 |
| Get the current processing state of the container. | |
| virtual void | update_processing_state (ProcessingState new_state)=0 |
| Update the processing state of the container. | |
| virtual void | register_state_change_callback (std::function< void(std::shared_ptr< SignalSourceContainer >, ProcessingState)> callback)=0 |
| Register a callback to be invoked on processing state changes. | |
| virtual void | unregister_state_change_callback ()=0 |
| Unregister the state change callback, if any. | |
| virtual bool | is_ready_for_processing () const =0 |
| Check if the container is ready for processing. | |
| virtual void | mark_ready_for_processing (bool ready)=0 |
| Mark the container as ready or not ready for processing. | |
| virtual void | create_default_processor ()=0 |
| Create and configure a default processor for this container. | |
| virtual void | process_default ()=0 |
| Process the container's data using the default processor. | |
| virtual void | set_default_processor (std::shared_ptr< DataProcessor > processor)=0 |
| Set the default data processor for this container. | |
| virtual std::shared_ptr< DataProcessor > | get_default_processor () const =0 |
| Get the current default data processor. | |
| virtual std::shared_ptr< DataProcessingChain > | get_processing_chain ()=0 |
| Get the current processing chain for this container. | |
| virtual void | set_processing_chain (std::shared_ptr< DataProcessingChain > chain)=0 |
| Set the processing chain for this container. | |
| virtual uint32_t | register_dimension_reader (uint32_t dimension_index)=0 |
| Register a reader for a specific dimension. | |
| virtual void | unregister_dimension_reader (uint32_t dimension_index)=0 |
| Unregister a reader for a specific dimension. | |
| virtual bool | has_active_readers () const =0 |
| Check if any dimensions currently have active readers. | |
| virtual void | mark_dimension_consumed (uint32_t dimension_index, uint32_t reader_id)=0 |
| Mark a dimension as consumed for the current processing cycle. | |
| virtual bool | all_dimensions_consumed () const =0 |
| Check if all active dimensions have been consumed in this cycle. | |
| virtual std::vector< DataVariant > & | get_processed_data ()=0 |
| Get a mutable reference to the processed data buffer. | |
| virtual const std::vector< DataVariant > & | get_processed_data () const =0 |
| Get a const reference to the processed data buffer. | |
| virtual const std::vector< DataVariant > & | get_data ()=0 |
| Get a reference to the raw data stored in the container. | |
| virtual void | mark_buffers_for_processing (bool should_process)=0 |
| Mark associated buffers for processing in the next cycle. | |
| virtual void | mark_buffers_for_removal ()=0 |
| Mark associated buffers for removal from the system. | |
| virtual DataAccess | channel_data (size_t channel_index)=0 |
| Get channel data with semantic interpretation. | |
| virtual std::vector< DataAccess > | all_channel_data ()=0 |
| Get all channel data as accessors. | |
Public Member Functions inherited from MayaFlux::Kakshya::NDDataContainer | |
| virtual | ~NDDataContainer ()=default |
| virtual std::vector< DataDimension > | get_dimensions () const =0 |
| Get the dimensions describing the structure of the data. | |
| virtual uint64_t | get_total_elements () const =0 |
| Get the total number of elements in the container. | |
| virtual MemoryLayout | get_memory_layout () const =0 |
| Get the memory layout used by this container. | |
| virtual void | set_memory_layout (MemoryLayout layout)=0 |
| Set the memory layout for this container. | |
| virtual uint64_t | get_frame_size () const =0 |
| Get the number of elements that constitute one "frame". | |
| virtual uint64_t | get_num_frames () const =0 |
| Get the number of frames in the primary (temporal) dimension. | |
| virtual std::vector< DataVariant > | get_region_data (const Region ®ion) const =0 |
| Get data for a specific region. | |
| virtual std::vector< DataVariant > | get_region_group_data (const RegionGroup ®ions) const =0 |
| Get data for multiple regions efficiently. | |
| virtual std::vector< DataVariant > | get_segments_data (const std::vector< RegionSegment > &segments) const =0 |
| Get data for multiple region segments efficiently. | |
| virtual void | set_region_data (const Region ®ion, const std::vector< DataVariant > &data)=0 |
| Set data for a specific region. | |
| virtual std::span< const double > | get_frame (uint64_t frame_index) const =0 |
| Get a single frame of data efficiently. | |
| virtual void | get_frames (std::span< double > output, uint64_t start_frame, uint64_t num_frames) const =0 |
| Get multiple frames efficiently. | |
| virtual double | get_value_at (const std::vector< uint64_t > &coordinates) const =0 |
| Get a single value at the specified coordinates. | |
| virtual void | set_value_at (const std::vector< uint64_t > &coordinates, double value)=0 |
| Set a single value at the specified coordinates. | |
| virtual void | add_region_group (const RegionGroup &group)=0 |
| Add a named group of regions to the container. | |
| virtual const RegionGroup & | get_region_group (const std::string &name) const =0 |
| Get a region group by name. | |
| virtual std::unordered_map< std::string, RegionGroup > | get_all_region_groups () const =0 |
| Get all region groups in the container. | |
| virtual void | remove_region_group (const std::string &name)=0 |
| Remove a region group by name. | |
| virtual bool | is_region_loaded (const Region ®ion) const =0 |
| Check if a region is loaded in memory. | |
| virtual void | load_region (const Region ®ion)=0 |
| Load a region into memory. | |
| virtual void | unload_region (const Region ®ion)=0 |
| Unload a region from memory. | |
| virtual uint64_t | coordinates_to_linear_index (const std::vector< uint64_t > &coordinates) const =0 |
| Convert coordinates to linear index based on current memory layout. | |
| virtual std::vector< uint64_t > | linear_index_to_coordinates (uint64_t linear_index) const =0 |
| Convert linear index to coordinates based on current memory layout. | |
| virtual void | clear ()=0 |
| Clear all data in the container. | |
| virtual void | lock ()=0 |
| Acquire a lock for thread-safe access. | |
| virtual void | unlock ()=0 |
| Release a previously acquired lock. | |
| virtual bool | try_lock ()=0 |
| Attempt to acquire a lock without blocking. | |
| virtual const void * | get_raw_data () const =0 |
| Get a raw pointer to the underlying data storage. | |
| virtual bool | has_data () const =0 |
| Check if the container currently holds any data. | |
| virtual ContainerDataStructure & | get_structure ()=0 |
| Get the data structure defining this container's layout. | |
| virtual const ContainerDataStructure & | get_structure () const =0 |
| virtual void | set_structure (ContainerDataStructure structure)=0 |
| Set the data structure for this container. | |
Data-driven interface for managing arbitrary processable signal sources.
SignalSourceContainer provides a flexible, extensible abstraction for handling any data source that can be interpreted and processed as an audio signal or multi-dimensional stream. Unlike AudioBuffer, which is specialized for direct audio sample storage, this container is designed for digital-first workflows and can manage:
The container maintains its own processing state and lifecycle, decoupled from the engine's BufferManager, enabling asynchronous, scheduled, or on-demand processing. It acts as a bridge between raw, heterogeneous data sources and the Maya Flux processing system, using DataProcessor objects to transform and organize data into processable, channel-oriented forms.
Key features:
This interface is foundational for advanced, data-driven workflows in Maya Flux, supporting real-time streaming, offline analysis, hybrid computation, and seamless integration of unconventional or future-facing signal sources.
Definition at line 100 of file SignalSourceContainer.hpp.