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

◆ add_to_root() [1/2]

void MayaFlux::Nodes::NodeGraphManager::add_to_root ( const std::shared_ptr< Node > &  node,
ProcessingToken  token,
unsigned int  channel = 0 
)

Add node to specific processing token and channel.

Parameters
nodeNode to add
tokenProcessing domain (AUDIO_RATE, VISUAL_RATE, etc.)
channelChannel within that domain

Registers the node with the specified processing domain and channel. The node's output will contribute to that token/channel's output. If the node is not already globally registered, it will be registered automatically.

Definition at line 18 of file NodeGraphManager.cpp.

21{
22 set_channel_mask(node, channel);
23 node->set_sample_rate(m_registered_sample_rate);
24
25 if (token == ProcessingToken::VISUAL_RATE) {
26 node->set_gpu_compatible(true);
27 }
28
29 auto& root = get_root_node(token, channel);
30 root.register_node(node);
31}
uint32_t m_registered_sample_rate
Sample rate for audio processing, used for normalization.
void set_channel_mask(const std::shared_ptr< Node > &node, uint32_t channel_id)
Adds the specified channel mask to a node's global registration.
RootNode & get_root_node(ProcessingToken token, unsigned int channel)
Gets or creates the root node for a specific token and channel.
@ VISUAL_RATE
Nodes that process at the visual frame rate.

References get_root_node(), m_registered_sample_rate, set_channel_mask(), and MayaFlux::Nodes::VISUAL_RATE.

Referenced by MayaFlux::Kriya::TemporalActivation::activate_node(), MayaFlux::Nodes::detail::composite_initialize(), MayaFlux::Nodes::ChainNode::initialize(), MayaFlux::Nodes::BinaryOpNode::initialize(), and route_node_to_channels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: