public final class MediaTimestamp extends Object
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.
Modifier and Type | Field and Description |
---|---|
float |
clockRate |
long |
mediaTimeUs |
long |
nanoTime |
Modifier and Type | Method and Description |
---|---|
long |
getAnchorMediaTimeUs()
Get the media time of the anchor in microseconds.
|
long |
getAnchorSytemNanoTime()
Get the
system time corresponding to the media time
in nanoseconds. |
float |
getMediaClockRate()
Get the rate of the media clock in relation to the system time.
|
public final long mediaTimeUs
public final long nanoTime
public final float clockRate
public long getAnchorMediaTimeUs()
public long getAnchorSytemNanoTime()
system time
corresponding to the media time
in nanoseconds.public float getMediaClockRate()
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.