class TimestampExtrapolator
Defined at line 17 of file ../../src/media/codec/codecs/timestamp_extrapolator.h
`TimestampExtrapolator` extrapolates timestamp-like values for a given
timebase for forward offsets in a stream of data.
Public Methods
void TimestampExtrapolator (uint64_t timebase, uint64_t bytes_per_second)
Creates a `TimestampExtrapolator` where `timebase` is the number of
ticks per second of real time and `byte_duration` is the amount of real
time consumed by a single byte of the uncompressed input.
For example, with PCM audio at 48000Hz, the bytes per second is
`48000 * number_of_channels * bytes_per_sample`
Defined at line 9 of file ../../src/media/codec/codecs/timestamp_extrapolator.cc
void TimestampExtrapolator ()
Creates a TimestampExtrapolator that can only carry over timestamps it has
been informed of.
Defined at line 12 of file ../../src/media/codec/codecs/timestamp_extrapolator.cc
void Inform (size_t offset, uint64_t timestamp)
Informs the extrapolator with an input `timestamp`, where `offset` is the
index of the byte in the uncompressed stream to which the `timestamp`
corresponds. This replaces any previously informed timestamp.
Defined at line 14 of file ../../src/media/codec/codecs/timestamp_extrapolator.cc
std::optional<uint64_t> Extrapolate (size_t offset)
Given a novel `offset` >= the the offset of the last informed timestamp,
extrapolate a timestamp value. This consumes the most recently informed
timestamp, leaving the extrapolator without a timestamp until another is
provided by `Inform()`.
Returns std::nullopt if there is no informed timestamp or no timebase for
extrapolation. Asserts that `offset` >= the offset of the last informed
timestamp.
Defined at line 18 of file ../../src/media/codec/codecs/timestamp_extrapolator.cc
void TimestampExtrapolator (TimestampExtrapolator && )
Defined at line 28 of file ../../src/media/codec/codecs/timestamp_extrapolator.h
void TimestampExtrapolator (TimestampExtrapolator & )
Defined at line 29 of file ../../src/media/codec/codecs/timestamp_extrapolator.h
TimestampExtrapolator & operator= (TimestampExtrapolator && )
Defined at line 30 of file ../../src/media/codec/codecs/timestamp_extrapolator.h
bool has_information ()
Defined at line 51 of file ../../src/media/codec/codecs/timestamp_extrapolator.h