class TimelineFunction

Defined at line 12666 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/natural_types.h

A TimelineFunction represents a relationship between a subject timeline and a

reference timeline with a linear relation.

For example, consider a common use case in which reference time is the

monotonic clock of a system and subject time is intended presentation time

for some media such as a video.

`reference_time` is the value of the monotonic clock at the beginning of

playback. `subject_time` is 0 assuming playback starts at the beginning of

the media. We then choose a `reference_delta` and `subject_delta` so that

`subject_delta` / `reference_delta` represents the desired playback rate,

e.g. 0/1 for paused and 1/1 for normal playback.

## Formulas

With a function we can determine the subject timeline value `s` in terms of

reference timeline value `r` with this formula (where `reference_delta` > 0):

s = (r - reference_time) * (subject_delta / reference_delta) + subject_time

And similarly we can find the reference timeline value `r` in terms of

subject timeline value `s` with this formula (where `subject_delta` > 0):

r = (s - subject_time) * (reference_delta / subject_delta) + referenc_time

## Choosing time values

Time values can be arbitrary and our linear relation will of course be the

same, but we can use them to represent the bounds of pieces in a piecewise

linear relation.

For example, if a user performs skip-chapter, we might want to describe

this with a TimelineFunction whose `subject_time` is the time to skip to,

`reference_time` is now plus some epsilon, and delta ratio is 1/1 for normal

playback rate.

Public Methods

void TimelineFunction (Storage_ storage)
void TimelineFunction (int64_t subject_time, int64_t reference_time, uint32_t subject_delta, uint32_t reference_delta)
void TimelineFunction ()

Default constructs a |TimelineFunction| only if all of its members are default constructible.

Defined at line 12676 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/natural_types.h

void TimelineFunction (TimelineFunction && )

Defined at line 12679 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/natural_types.h

void TimelineFunction (const TimelineFunction & other)
TimelineFunction & operator= (TimelineFunction && )

Defined at line 12680 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/natural_types.h

TimelineFunction & operator= (const TimelineFunction & other)
bool operator== (const TimelineFunction & other)
bool operator!= (const TimelineFunction & other)
int64_t subject_time ()

A value from the subject timeline that correlates to reference_time.

int64_t & subject_time ()

A value from the subject timeline that correlates to reference_time.

TimelineFunction & subject_time (int64_t value)

A value from the subject timeline that correlates to reference_time.

int64_t reference_time ()

A value from the reference timeline that correlates to subject_time.

int64_t & reference_time ()

A value from the reference timeline that correlates to subject_time.

TimelineFunction & reference_time (int64_t value)

A value from the reference timeline that correlates to subject_time.

uint32_t subject_delta ()

The change in the subject timeline corresponding to reference_delta.

uint32_t & subject_delta ()

The change in the subject timeline corresponding to reference_delta.

TimelineFunction & subject_delta (uint32_t value)

The change in the subject timeline corresponding to reference_delta.

uint32_t reference_delta ()

The change in the reference timeline corresponding to subject_delta.

Cannot be zero.

uint32_t & reference_delta ()

The change in the reference timeline corresponding to subject_delta.

Cannot be zero.

TimelineFunction & reference_delta (uint32_t value)

The change in the reference timeline corresponding to subject_delta.

Cannot be zero.

void TimelineFunction (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Friends

class MemberVisitor
class NaturalStructCodingTraits