|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Container for top-level nodes in a processing channel with multi-modal support. More...
#include <RootNode.hpp>
Collaboration diagram for MayaFlux::Nodes::RootNode:Classes | |
| struct | PendingOp |
| Structure for storing pending node registration/unregistration operations. More... | |
Public Member Functions | |
| RootNode (ProcessingToken token=ProcessingToken::AUDIO_RATE, uint32_t channel=0) | |
| Constructs a RootNode for a specific processing token and channel. | |
| void | register_node (const std::shared_ptr< Node > &node) |
| Adds a node to this root node. | |
| void | unregister_node (const std::shared_ptr< Node > &node) |
| Removes a node from this root node. | |
| bool | preprocess () |
| Checks if the root node can process pending operations. | |
| void | postprocess () |
| Performs post-processing after all nodes have been processed. | |
| double | process_sample () |
| Processes a single sample from all registered nodes. | |
| void | process_frame () |
| Processes a single frame from all registered nodes. | |
| std::vector< double > | process_batch (uint32_t num_samples) |
| Processes all registered nodes and combines their outputs. | |
| void | process_batch_frame (uint32_t num_frames) |
| Processes multiple frames from all registered nodes. | |
| unsigned int | get_node_size () |
| Gets the number of nodes registered with this root node. | |
| void | clear_all_nodes () |
| Removes all nodes from this root node. | |
| uint32_t | get_channel () |
| Gets the channel index associated with this root node. | |
| ProcessingToken | get_token () |
| Gets the processing token associated with this root node. | |
Private Member Functions | |
| void | process_pending_operations () |
| Processes any pending node registration/unregistration operations. | |
Private Attributes | |
| std::vector< std::shared_ptr< Node > > | m_Nodes |
| Collection of nodes registered with this root node. | |
| std::atomic< bool > | m_is_processing |
| Flag indicating if the root node is currently processing nodes. | |
| struct MayaFlux::Nodes::RootNode::PendingOp | m_pending_ops [2048] |
| std::atomic< uint32_t > | m_pending_count |
| Counter tracking the number of pending operations. | |
| uint32_t | m_channel |
| The processing channel index for this root node. | |
| bool | m_skip_state_management |
| Flag indicating whether to skip preprocessing and post processing. | |
| ProcessingToken | m_token |
| The processing token indicating the domain of this root node. | |
Container for top-level nodes in a processing channel with multi-modal support.
The RootNode serves as a collection point for multiple independent nodes that contribute to a single channel's output. Unlike regular nodes, a RootNode doesn't process data itself but rather manages and combines the outputs of its registered nodes.
With multi-modal support, the RootNode can handle different processing rates (e.g., audio rate, visual rate, custom rates) in a single channel. This enables advanced scenarios where nodes with different processing requirements coexist.
Each processing channel has its own RootNode, which collects and processes all nodes that should output to that channel. The RootNode processes all registered nodes and aggregates their outputs based on their assigned processing rates.
Definition at line 29 of file RootNode.hpp.