51 const Duration DEFAULT_JOB_PLANNING_TURNOVER(FSecs(3,2));
59 buildStandardGridForFramerate (
FrameRate fps)
79 : grid_{buildStandardGridForFramerate(fps)}
80 , playbackUrgency {ASAP}
90 : grid_{buildStandardGridForFramerate(fps)}
91 , playbackUrgency {TIMEBOUND}
114 && (( (ASAP == playbackUrgency || NICE == playbackUrgency)
117 (TIMEBOUND == playbackUrgency
123 Timings::getOrigin()
const 125 return Time(grid_->timeOf(0));
130 Timings::getFrameStartAt (FrameCnt frameNr)
const 132 return Time(grid_->timeOf(frameNr));
137 Timings::getFrameDurationAt (
TimeValue refPoint)
const 139 FrameCnt frameNr = grid_->gridPoint (refPoint);
140 return getFrameDurationAt(frameNr);
145 Timings::getFrameDurationAt (FrameCnt refFrameNr)
const 147 return Offset (grid_->timeOf(refFrameNr), grid_->timeOf(refFrameNr + 1));
154 FrameCnt frameNr = grid_->gridPoint (refPoint);
155 return grid_->timeOf(frameNr) == refPoint? frameNr
177 if (TIMEBOUND == playbackUrgency)
191 Offset nominalOffset (grid_->timeOf(0), grid_->timeOf(frameOffset));
192 return isOriginalSpeed()? nominalOffset
193 : nominalOffset * playbackSpeed;
201 UNIMPLEMENTED (
"controlling the job planning rhythm");
208 TimeVar breakingPoint = grid_->timeOf(anchorFrame);
210 FrameCnt nextFrame = grid_->gridPoint (breakingPoint);
212 ASSERT (breakingPoint <= grid_->timeOf(nextFrame));
213 ASSERT (breakingPoint > grid_->timeOf(nextFrame-1));
215 if (grid_->timeOf(nextFrame) == breakingPoint)
224 Timings::constrainedBy (
Timings additionalConditions)
226 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.