TimestampAligner

open class TimestampAligner

The TimestampAligner class helps translating camera timestamps into the same timescale as is used by rtc::TimeNanos(). Some cameras have built in timestamping which is more accurate than reading the system clock, but using a different epoch and unknown clock drift. Frame timestamps in webrtc should use rtc::TimeNanos (system monotonic time), and this class provides a filter which lets us use the rtc::TimeNanos timescale, and at the same time take advantage of higher accuracy of the camera clock. This class is a wrapper on top of rtc::TimestampAligner.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun dispose()
Dispose native timestamp aligner.
Link copied to clipboard
open fun getRtcTimeNanos(): Long
Wrapper around rtc::TimeNanos().
Link copied to clipboard
open fun translateTimestamp(cameraTimeNs: Long): Long
Translates camera timestamps to the same timescale as is used by rtc::TimeNanos().