MayaFlux 0.2.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 148 of file RootNode.cpp.

149{
150 if (!preprocess())
151 return;
152
153 for (auto& node : m_Nodes) {
154 uint32_t state = node->m_state.load();
155 if (!(state & Utils::NodeState::PROCESSED)) {
156 node->process_sample();
158 }
159 }
160
161 postprocess();
162}
std::vector< std::shared_ptr< Node > > m_Nodes
Collection of nodes registered with this root node.
Definition RootNode.hpp:159
bool preprocess()
Checks if the root node can process pending operations.
Definition RootNode.cpp:96
void postprocess()
Performs post-processing after all nodes have been processed.
Definition RootNode.cpp:164
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: