MayaFlux 0.4.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 19 of file NodeGraphManager.cpp.

22{
24 node->set_sample_rate(m_registered_sample_rate);
25 node->set_frame_rate(m_registered_frame_rate);
26
27 if (token == ProcessingToken::VISUAL_RATE) {
28 node->set_gpu_compatible(true);
29 }
30
31 auto& root = get_root_node(token, channel);
32 root.register_node(node);
33}
uint32_t channel
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.
uint32_t m_registered_frame_rate
Frame rate for visual processing, used for timing and normalization.
@ VISUAL_RATE
Nodes that process at the visual frame rate.

References channel, get_root_node(), m_registered_frame_rate, 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: