79 Job job = plan.buildJob();
81 CHECK (dispatcher.
verify (job, port, sink));
97 Time nominalTime{200,0};
105 + timings.engineLatency
106 + timings.outputLatency;
108 Offset nominalOffset (timings.getFrameStartAt(0), timings.getFrameStartAt(frameNr));
109 Time expectedDeadline{timings.scheduledDelivery + nominalOffset - latency};
112 "real-time-origin : %s\n" 113 "total latency : %s\n" 115 % frameNr % nominalOffset
116 % timings.scheduledDelivery
118 % plan.determineDeadline(timings)
120 CHECK (plan.determineDeadline(timings) == expectedDeadline);
121 CHECK (timings.scheduledDelivery ==
Time(0,0,5) );
122 CHECK (timings.playbackUrgency == play::TIMEBOUND);
125 timings.playbackUrgency = play::ASAP;
146 auto [port,sink] = dispatcher.getDummyConnection(1);
149 Time nominalTime{200,0};
150 size_t portIDX = dispatcher.resolveModelPort (port);
151 JobTicket& ticket = dispatcher.getJobTicketFor(portIDX, nominalTime);
154 JobPlanning masterPlan{ticket,nominalTime,frameNr};
155 JobPlanning prereqPlan{move(*(masterPlan.buildDependencyPlanning() ))};
157 CHECK (isSameObject(ticket, masterPlan.ticket()));
158 CHECK (isSameObject(prereq, prereqPlan.ticket()));
159 CHECK ( masterPlan.isTopLevel());
160 CHECK (not prereqPlan.isTopLevel());
162 Time masterDeadline = masterPlan.determineDeadline (timings);
163 Time prereqDeadline = prereqPlan.determineDeadline (timings);
167 + timings.engineLatency;
169 Time expectedDeadline{masterDeadline - latency};
172 "master deadline : %s\n" 174 "prereq deadline : %s"}
179 CHECK (prereqDeadline == expectedDeadline);
182 timings.playbackUrgency = play::ASAP;
183 CHECK (
Time::ANYTIME == masterPlan.determineDeadline (timings));
184 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.
Simplistic test class runner.
void seedRand()
draw a new random seed from a common nucleus, and re-seed the default-Gen.
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, based directly on the referee's memory identities. ...