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

◆ execute_frame_rate()

void MayaFlux::Kriya::BufferPipeline::execute_frame_rate ( uint64_t  max_cycles = 0,
uint64_t  frames_per_operation = 0 
)

Execute the pipeline at graphics frame rate.

Parameters
max_cyclesMaximum number of cycles to execute (0 = infinite)
frames_per_operationFrames to wait after each processing operation (0 = none)

Runs the configured strategy on a GraphicsRoutine. Each capture iteration takes one frame, so a graphics capture armed in one frame resolves in the next. The capture and process timing modes apply only to buffer and sample rate execution. A pipeline with no waiting operation still advances one cycle per frame.

Exceptions
std::runtime_errorif pipeline has no scheduler
Note
Execution is asynchronous. The pipeline keeps itself alive until completion.

Definition at line 93 of file BufferPipeline.cpp.

94{
95 if (!m_scheduler) {
96 error<std::runtime_error>(Journal::Component::Kriya,
98 std::source_location::current(),
99 "Pipeline requires scheduler for execution");
100 }
101
102 auto self = shared_from_this();
103
104 if (max_cycles == 0) {
105 max_cycles = UINT64_MAX;
107 }
108 m_max_cycles = max_cycles;
109
110 auto routine = std::make_shared<Vruta::GraphicsRoutine>(
111 execute_frame_internal(max_cycles, frames_per_operation));
112
113 m_routine = routine;
114 m_scheduler->add_task(std::move(routine));
115
116 m_active_self = self;
117}
Vruta::GraphicsRoutine execute_frame_internal(uint64_t max_cycles, uint64_t frames_per_operation)
std::shared_ptr< BufferPipeline > m_active_self
std::shared_ptr< Vruta::Routine > m_routine
Vruta::TaskScheduler * m_scheduler
void add_task(const std::shared_ptr< Routine > &routine, const std::string &name="", bool initialize=false)
Add a routine to the scheduler based on its processing token.
Definition Scheduler.cpp:94
@ CoroutineScheduling
Coroutine scheduling and temporal coordination (Vruta::TaskScheduler)
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.

References MayaFlux::Vruta::TaskScheduler::add_task(), MayaFlux::Journal::CoroutineScheduling, execute_frame_internal(), MayaFlux::Journal::Kriya, m_active_self, m_continuous_execution, m_max_cycles, m_routine, and m_scheduler.

+ Here is the call graph for this function: