42 const Duration DEFAULT_JOB_PLANNING_TURNOVER(FSecs(3,2));
50 buildStandardGridForFramerate (
FrameRate fps)
70 : grid_{buildStandardGridForFramerate(fps)}
71 , playbackUrgency {ASAP}
81 : grid_{buildStandardGridForFramerate(fps)}
82 , playbackUrgency {TIMEBOUND}
105 && (( (ASAP == playbackUrgency || NICE == playbackUrgency)
108 (TIMEBOUND == playbackUrgency
114 Timings::getOrigin()
const 116 return Time(grid_->timeOf(0));
121 Timings::getFrameStartAt (FrameCnt frameNr)
const 123 return Time(grid_->timeOf(frameNr));
128 Timings::getFrameDurationAt (
TimeValue refPoint)
const 130 FrameCnt frameNr = grid_->gridPoint (refPoint);
131 return getFrameDurationAt(frameNr);
136 Timings::getFrameDurationAt (FrameCnt refFrameNr)
const 138 return Offset (grid_->timeOf(refFrameNr), grid_->timeOf(refFrameNr + 1));
145 FrameCnt frameNr = grid_->gridPoint (refPoint);
146 return grid_->timeOf(frameNr) == refPoint? frameNr
168 if (TIMEBOUND == playbackUrgency)
182 Offset nominalOffset (grid_->timeOf(0), grid_->timeOf(frameOffset));
183 return isOriginalSpeed()? nominalOffset
184 : nominalOffset * playbackSpeed;
192 UNIMPLEMENTED (
"controlling the job planning rhythm");
199 TimeVar breakingPoint = grid_->timeOf(anchorFrame);
201 FrameCnt nextFrame = grid_->gridPoint (breakingPoint);
203 ASSERT (breakingPoint <= grid_->timeOf(nextFrame));
204 ASSERT (breakingPoint > grid_->timeOf(nextFrame-1));
206 if (grid_->timeOf(nextFrame) == breakingPoint)
215 Timings::constrainedBy (
Timings additionalConditions)
217 UNIMPLEMENTED (
"how to combine timing constraints");
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
FrameCnt getBreakPointAfter(TimeValue refPoint) const
the next grid point at or after the given reference time
Time scheduledDelivery
a wall clock time corresponding to the Grid's origin. Can be Time::Never (=not time bound) ...
bool isValid() const
Consistency self-check.
Rational number support, based on boost::rational.
Framerate specified as frames per second.
Generic frame timing specification.
FrameCnt establishNextPlanningChunkStart(FrameCnt anchorFrame) const
establish the time point to anchor the next planning chunk, in accordance with getPlanningChunkDurati...
Steam-Layer implementation namespace root.
static const Duration NIL
constant to indicate "no duration"
Time getTimeDue(FrameCnt frameOffset) const
real time deadline for the given frame, without any latency.
Lumiera's internal time value datatype.
static Timings DISABLED
marker for halted output
Offset getRealOffset(FrameCnt frameOffset) const
calculate the given frame's distance from origin, but do so using the real time scale, including any playback speed factor and similar corrections.
Duration getPlanningChunkDuration() const
the minimum time span to be covered by frame calculation jobs planned in one sway.
Duration engineLatency
reasonable guess at the scheduling and dispatch-delay of the render engine
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Duration constantFrameTimingsInterval(TimeValue startPoint) const
the frame spacing and duration remains constant for some time...
Support library to represent grid-aligned time specifications This is part of Lumiera's time and time...
Timings(FrameRate fps)
Create a default initialised Timing constraint record.
static const Time NEVER
border condition marker value. NEVER >= any time value
Offset measures a distance in time.
How to define a timing specification or constraint.
Duration is the internal Lumiera time metric.
int64_t FrameCnt
relative framecount or frame number.
basic constant internal time value.
Simple stand-alone Quantiser implementation based on a constant sized gird.