![]() |
Lumiera 0.pre.04~rc.1
»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 89 of file timequant.hpp.
Public Member Functions | |
| QuTime (TimeValue raw, Symbol gridID) | |
| build a quantised time value, referring the time grid by-name. | |
| 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. | |
| operator PQuant () const | |
| template<class FMT > | |
| bool | supports () const |
| does our implicit time grid support building that timecode format? | |
| template<class FMT > | |
| format::Traits< FMT >::TimeCode | formatAs () const |
| create new time code instance, then castInto | |
| template<class TC > | |
| void | castInto (TC &timecode) const |
| quantise into implicit grid, then rebuild the timecode | |
| void | accept (Mutation const &) |
| receive change message, which might cause re-quantisation | |
Public Member Functions inherited from Time | |
| Time (TimeValue const &val=TimeValue(0)) | |
| Time (FSecs const &fractionalSeconds) | |
| convenience constructor to build an Time value from a fraction of seconds, given as rational number. | |
| Time (Time const &)=default | |
| Time (TimeVar const &calcResult) | |
| 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. | |
| 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 (raw_time_64 val) | |
| TimeValue (TimeValue const &o) | |
| copy initialisation allowed | |
| operator std::string () const | |
| bool | isRegular () const |
| std::strong_ordering | operator<=> (TimeValue const &) const =default |
| bool | operator== (TimeValue const &) const =default |
| std::strong_ordering | operator<=> (raw_time_64 tt) const |
| bool | operator== (raw_time_64 tt) const |
Private Attributes | |
| PQuant | quantiser_ |
Additional Inherited Members | |
Static Public Attributes inherited from Time | |
| static const Time | MAX |
| static const Time | MIN |
| static const Time | ZERO |
| static const Time | ANYTIME |
| border condition marker value. ANYTIME <= any time value | |
| static const Time | NEVER |
| border condition marker value. NEVER >= any time value | |
Static Public Attributes inherited from TimeValue | |
| static const raw_time_64 | SCALE = 1'000'000 |
| Number of micro ticks (µs) per second as basic time scale. | |
Static Public Member Functions inherited from TimeValue | |
| static TimeValue | buildRaw_ (raw_time_64) |
Protected Member Functions inherited from TimeValue | |
| TimeValue & | operator= (TimeValue const &o) |
| Assigning of time values is not allowed, but derived classed might allow that. | |
| TimeValue (TimeValue const &origin, TimeValue const &target) | |
Static Protected Member Functions inherited from TimeValue | |
| static raw_time_64 | limitedTime (raw_time_64 raw) |
| explicit limit of allowed time range | |
| static raw_time_64 | limitedDelta (raw_time_64 origin, raw_time_64 target) |
| safe calculation of explicitly limited time offset | |
Protected Attributes inherited from TimeValue | |
| raw_time_64 | 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 86 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 120 of file quantiser.cpp.
|
inline |
shared-ptr to the associated time grid (or time scale) Definition at line 121 of file timequant.hpp.
|
inline |
does our implicit time grid support building that timecode format?
Definition at line 129 of file timequant.hpp.
References QuTime::quantiser_.
Referenced by TimeQuantisation_test::check_theFullStory().
Here is the caller graph for this function:
|
inline |
create new time code instance, then castInto
Definition at line 137 of file timequant.hpp.
Referenced by TimeQuantisation_test::check_theFullStory(), TimeQuantisation_test::checkGridBinding(), TimeFormats_test::checkTimecodeUsageCycle(), TimeMutation_test::mutate_by_Increment(), and TimeMutation_test::mutate_quantised().
Here is the caller graph for this function:
|
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 155 of file timequant.hpp.
References QuTime::quantiser_.
Referenced by FrameNr::FrameNr(), and SmpteTC::SmpteTC().
Here is the caller graph for this function:| void accept | ( | Mutation const & | ) |
receive change message, which might cause re-quantisation
Referenced by TimeFormats_test::checkTimecodeUsageCycle(), TimeMutation_test::mutate_by_Increment(), TimeMutation_test::mutate_by_Offset(), TimeMutation_test::mutate_by_Value(), and TimeMutation_test::mutate_quantised().
Here is the caller graph for this function:
|
private |
Definition at line 92 of file timequant.hpp.
Referenced by QuTime::castInto(), and QuTime::supports().
Inheritance diagram for QuTime:
Collaboration diagram for QuTime: