class TimelineFunction
Defined at line 21 of file ../../src/media/audio/lib/timeline/timeline_function.h
A linear function from int64_t to int64_t with non-negative slope that translates reference
timeline values into subject timeline values (the 'subject' being the timeline that's represented
by the function). The representation is in point-slope form. The point is represented as two
int64_t time values (subject_time, reference_time), and the slope (rate) is represented as a
TimelineRate, the ratio of two uint64_t values (subject_delta / reference_delta).
Public Methods
int64_t Apply (int64_t subject_time, int64_t reference_time, TimelineRate rate, int64_t reference_input)
Applies a timeline function.
Defined at line 18 of file ../../src/media/audio/lib/timeline/timeline_function.cc
int64_t ApplyInverse (int64_t subject_time, int64_t reference_time, TimelineRate rate, int64_t subject_input)
Applies the inverse of a timeline function.
Defined at line 29 of file ../../src/media/audio/lib/timeline/timeline_function.h
void TimelineFunction ()
Defined at line 41 of file ../../src/media/audio/lib/timeline/timeline_function.h
void TimelineFunction (int64_t subject_time, int64_t reference_time, uint64_t subject_delta, uint64_t reference_delta)
Defined at line 43 of file ../../src/media/audio/lib/timeline/timeline_function.h
void TimelineFunction (int64_t subject_time, int64_t reference_time, uint32_t subject_delta, uint32_t reference_delta)
Defined at line 44 of file ../../sdk/lib/media/cpp/timeline_function.h
void TimelineFunction (int64_t subject_time, int64_t reference_time, TimelineRate rate)
Defined at line 49 of file ../../src/media/audio/lib/timeline/timeline_function.h
TimelineFunction Compose (const TimelineFunction & bc, const TimelineFunction & ab, bool exact)
Composes timeline functions B->C and A->B, producing A->C. If exact, ASSERTs on precision loss.
TODO(mpuryear): Consider always allowing inexact results.
Defined at line 49 of file ../../src/media/audio/lib/timeline/timeline_function.cc
void TimelineFunction (TimelineRate rate)
Defined at line 52 of file ../../src/media/audio/lib/timeline/timeline_function.h
bool invertible ()
Determines whether this |TimelineFunction| is invertible.
Defined at line 56 of file ../../src/media/audio/lib/timeline/timeline_function.h
int64_t Apply (int64_t reference_input)
Applies the function. Returns TimelineRate::kOverflow on overflow.
Defined at line 59 of file ../../src/media/audio/lib/timeline/timeline_function.h
int64_t ApplyInverse (int64_t subject_input)
Applies the inverse of the function. Returns TimelineRate::kOverflow on overflow.
Defined at line 64 of file ../../src/media/audio/lib/timeline/timeline_function.h
int64_t operator() (int64_t reference_input)
Applies the function. Returns TimelineRate::kOverflow on overflow.
Defined at line 70 of file ../../src/media/audio/lib/timeline/timeline_function.h
TimelineFunction Inverse ()
Returns a timeline function that is the inverse of this timeline function.
Defined at line 73 of file ../../src/media/audio/lib/timeline/timeline_function.h
int64_t subject_time ()
Defined at line 78 of file ../../src/media/audio/lib/timeline/timeline_function.h
int64_t reference_time ()
Defined at line 79 of file ../../src/media/audio/lib/timeline/timeline_function.h
const TimelineRate & rate ()
Defined at line 81 of file ../../src/media/audio/lib/timeline/timeline_function.h
uint64_t subject_delta ()
Defined at line 83 of file ../../src/media/audio/lib/timeline/timeline_function.h
uint64_t reference_delta ()
Defined at line 84 of file ../../src/media/audio/lib/timeline/timeline_function.h