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

◆ process_frame()

void MayaFlux::Nodes::RootNode::process_frame ( )

Processes a single frame from all registered nodes.

This method processes each registered node for a single frame. It is useful in scenarios where frame-based processing is required, such as visual or animation data processing.

Definition at line 139 of file RootNode.cpp.

140{
141 if (!preprocess())
142 return;
143
144 for (auto& node : m_Nodes) {
145 uint32_t state = node->m_state.load();
146 if (!(state & Utils::NodeState::PROCESSED)) {
147 node->process_sample();
149 }
150 }
151
152 postprocess();
153}
std::vector< std::shared_ptr< Node > > m_Nodes
Collection of nodes registered with this root node.
Definition RootNode.hpp:151
bool preprocess()
Checks if the root node can process pending operations.
Definition RootNode.cpp:93
void postprocess()
Performs post-processing after all nodes have been processed.
Definition RootNode.cpp:155
void atomic_add_flag(std::atomic< Utils::NodeState > &state, Utils::NodeState flag)
Atomically adds a flag to a node state.
Definition NodeUtils.cpp:96
@ PROCESSED
Node has been processed this cycle.
Definition Utils.hpp:34

References MayaFlux::Nodes::atomic_add_flag(), m_Nodes, postprocess(), preprocess(), and MayaFlux::Utils::PROCESSED.

Referenced by process_batch_frame().

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