Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/timequant.hpp"
grid aligned time specification, referring to a specific scale.
A quantised time value allows to access the time specification as numeric value in one of the supported timecode formats, and relative to the defined time scale. Usually this time scale exists already in the Lumiera session and is referred simply by symbolic ID, it will be fetched on demand through the advice system.
By creating a QuTime value, the relation to such a predefined time scale is made explicit. This doesn't change the internal time value, but the actual creation of a timecode formatted value (formatAs) usually implies to quantise or grid align the time to the frame grid specific to this time scale.
Definition at line 99 of file timequant.hpp.
Public Member Functions | |
QuTime (TimeValue raw, Symbol gridID) | |
build a quantised time value, referring the time grid by-name. More... | |
QuTime (TimeValue raw, PQuant quantisation_to_use) | |
build a quantised time value by explicitly specifying a grid alignment facility and without any hidden reference to the Lumiera session. More... | |
void | accept (Mutation const &) |
receive change message, which might cause re-quantisation | |
template<class TC > | |
void | castInto (TC &timecode) const |
quantise into implicit grid, then rebuild the timecode More... | |
template<class FMT > | |
format::Traits< FMT >::TimeCode | formatAs () const |
create new time code instance, then castInto | |
operator PQuant () const | |
template<class FMT > | |
bool | supports () const |
does our implicit time grid support building that timecode format? | |
Public Member Functions inherited from Time | |
Time (TimeValue const &val=TimeValue(0)) | |
Time (TimeVar const &calcResult) | |
Time (FSecs const &fractionalSeconds) | |
convenience constructor to build an Time value from a fraction of seconds, given as rational number. More... | |
Time (long millis, uint secs, uint mins=0, uint hours=0) | |
convenience constructor to build an internal Lumiera Time value from the usual parts of an sexagesimal time specification. More... | |
operator std::string () const | |
TimeVar | operator+ (TimeValue const &tval) const |
convenience start for time calculations | |
TimeVar | operator- (TimeValue const &tval) const |
TimeVar | operator- () const |
Public Member Functions inherited from TimeValue | |
TimeValue (gavl_time_t val) | |
TimeValue (TimeValue const &o) | |
copy initialisation allowed | |
bool | isRegular () const |
operator std::string () const | |
Private Attributes | |
PQuant | quantiser_ |
Additional Inherited Members | |
Static Public Member Functions inherited from TimeValue | |
static TimeValue | buildRaw_ (gavl_time_t) |
Static Public Attributes inherited from Time | |
static const Time | ANYTIME |
border condition marker value. ANYTIME <= any time value | |
static const Time | MAX |
static const Time | MIN |
static const Time | NEVER |
border condition marker value. NEVER >= any time value | |
static const Time | ZERO |
Static Public Attributes inherited from TimeValue | |
static const gavl_time_t | SCALE = GAVL_TIME_SCALE |
Number of micro ticks (µs) per second as basic time scale. | |
Protected Member Functions inherited from TimeValue | |
TimeValue (TimeValue const &origin, TimeValue const &target) | |
TimeValue & | operator= (TimeValue const &o) |
Assigning of time values is not allowed, but derived classed might allow that. | |
Static Protected Member Functions inherited from TimeValue | |
static gavl_time_t | limitedDelta (gavl_time_t origin, gavl_time_t target) |
safe calculation of explicitly limited time offset | |
static gavl_time_t | limitedTime (gavl_time_t raw) |
explicit limit of allowed time range More... | |
Protected Attributes inherited from TimeValue | |
gavl_time_t | t_ |
the raw (internal) time value used to implement the time types | |
build a quantised time value, referring the time grid by-name.
This is the preferred standard way of establishing a quantisation, but it requires an existing time scale defined in the Lumiera Session, as TimeGrid (meta asset). Usually, such a time scale gets built based on the format and parameters of an output bus.
Definition at line 94 of file common-services.cpp.
build a quantised time value by explicitly specifying a grid alignment facility and without any hidden reference to the Lumiera session.
This is mainly intended for debugging and unit testing.
Definition at line 73 of file quantiser.cpp.
|
inline |
shared-ptr
to the associated time grid (or time scale) Definition at line 131 of file timequant.hpp.
|
inline |
quantise into implicit grid, then rebuild the timecode
TC | the kind of time code to use as target |
timecode | existing instance of that timecode, to be overwritten |
Definition at line 165 of file timequant.hpp.
References TimeValue::TimeValue().