MediaTimestamp

Added in 1.0.0
Deprecated in 1.3.0

class MediaTimestamp


An immutable object that represents the linear correlation between the media time and the system time. It contains the media clock rate, together with the media timestamp of an anchor frame and the system time when that frame was presented or is committed to be presented.

The phrase "present" means that audio/video produced on device is detectable by an external observer off device. The time is based on the implementation's best effort, using whatever knowledge is available to the system, but cannot account for any delay unknown to the implementation. The anchor frame could be any frame, including a just-rendered frame, or even a theoretical or in-between frame, based on the source of the MediaTimestamp. When the anchor frame is a just-rendered one, the media time stands for current position of the playback or recording.

See also
getTimestamp

Summary

Constants

const MediaTimestamp

An unknown media timestamp value

Public functions

Boolean
equals(obj: Any!)
Long

Get the media time of the anchor in microseconds.

Long

Get the system time corresponding to the media time in nanoseconds.

Float

Get the rate of the media clock in relation to the system time.

Int
String!

Constants

TIMESTAMP_UNKNOWN

Added in 1.0.0
Deprecated in 1.3.0
const val TIMESTAMP_UNKNOWNMediaTimestamp

An unknown media timestamp value

Public functions

equals

fun equals(obj: Any!): Boolean

getAnchorMediaTimeUs

Added in 1.0.0
Deprecated in 1.3.0
fun getAnchorMediaTimeUs(): Long

Get the media time of the anchor in microseconds.

getAnchorSystemNanoTime

Added in 1.0.0
Deprecated in 1.3.0
fun getAnchorSystemNanoTime(): Long

Get the system time corresponding to the media time in nanoseconds.

getMediaClockRate

Added in 1.0.0
Deprecated in 1.3.0
fun getMediaClockRate(): Float

Get the rate of the media clock in relation to the system time.

It is 1.0 if media clock advances in sync with the system clock; greater than 1.0 if media clock is faster than the system clock; less than 1.0 if media clock is slower than the system clock.

hashCode

fun hashCode(): Int

toString

fun toString(): String!