86 Job job = plan.buildJob();
88 CHECK (dispatcher.
verify (job, port, sink));
104 Time nominalTime{200,0};
112 + timings.engineLatency
113 + timings.outputLatency;
115 Offset nominalOffset (timings.getFrameStartAt(0), timings.getFrameStartAt(frameNr));
116 Time expectedDeadline{timings.scheduledDelivery + nominalOffset - latency};
119 "real-time-origin : %s\n" 120 "total latency : %s\n" 122 % frameNr % nominalOffset
123 % timings.scheduledDelivery
125 % plan.determineDeadline(timings)
127 CHECK (plan.determineDeadline(timings) == expectedDeadline);
128 CHECK (timings.scheduledDelivery ==
Time(0,0,5) );
129 CHECK (timings.playbackUrgency == play::TIMEBOUND);
132 timings.playbackUrgency = play::ASAP;
153 auto [port,sink] = dispatcher.getDummyConnection(1);
156 Time nominalTime{200,0};
157 size_t portIDX = dispatcher.resolveModelPort (port);
158 JobTicket& ticket = dispatcher.getJobTicketFor(portIDX, nominalTime);
161 JobPlanning masterPlan{ticket,nominalTime,frameNr};
162 JobPlanning prereqPlan{move(*(masterPlan.buildDependencyPlanning() ))};
164 CHECK (isSameObject(ticket, masterPlan.ticket()));
165 CHECK (isSameObject(prereq, prereqPlan.ticket()));
166 CHECK ( masterPlan.isTopLevel());
167 CHECK (not prereqPlan.isTopLevel());
169 Time masterDeadline = masterPlan.determineDeadline (timings);
170 Time prereqDeadline = prereqPlan.determineDeadline (timings);
174 + timings.engineLatency;
176 Time expectedDeadline{masterDeadline - latency};
179 "master deadline : %s\n" 181 "prereq deadline : %s"}
186 CHECK (prereqDeadline == expectedDeadline);
189 timings.playbackUrgency = play::ASAP;
190 CHECK (
Time::ANYTIME == masterPlan.determineDeadline (timings));
191 CHECK (
Time::ANYTIME == prereqPlan.determineDeadline (timings));
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
size_t resolveModelPort(ModelPort modelPort) override
translate a generic ModelPort spec into the specific index number applicable at the Timeline referred...
Mock data structures to support implementation testing of render job planning and frame dispatch...
JobTicket & getJobTicketFor(size_t portIDX, TimeValue nominalTime) override
Core Dispatcher operation: locate the appropriate Segment and retrieve/derive a »blueprint« for rende...
Framerate specified as frames per second.
Generic frame timing specification.
A mocked frame Dispatcher setup without any backing model.
play::test::DummyOutputLink getDummyConnection(uint index)
The faked builder/playback setup provides some preconfigured ModelPort and corresponding DataSink han...
Steam-Layer implementation namespace root.
A front-end for using printf-style formatting.
Lumiera's internal time value datatype.
Abstract Base Class for all testcases.
bool verify(Job const &job, ModelPort const &port, play::DataSink const &sink)
Test support: verify the given Job is consistent with this Dispatcher.
Simple test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Offset measures a distance in time.
How to define a timing specification or constraint.
View on the execution planning for a single calculation step.
Duration is the internal Lumiera time metric.
Individual frame rendering task, forwarding to a closure.
a family of time value like entities and their relationships.
auto getPrerequisites()
Core operation: iterate over the prerequisites, required to carry out a render operation based on thi...
static const FrameRate PAL
predefined constant for PAL framerate
execution plan for pulling a specific exit node.
Duration getExpectedRuntime()
Core operation: guess expected runtime for rendering.
bool isSameObject(A const &a, B const &b)
compare plain object identity, bypassing any custom comparison operators.