다음을 통해 공유


SurfaceTexture.Timestamp Property

Definition

Retrieve the timestamp associated with the texture image set by the most recent call to #updateTexImage.

public virtual long Timestamp { [Android.Runtime.Register("getTimestamp", "()J", "GetGetTimestampHandler")] get; }
[<get: Android.Runtime.Register("getTimestamp", "()J", "GetGetTimestampHandler")>]
member this.Timestamp : int64

Property Value

Attributes

Remarks

Retrieve the timestamp associated with the texture image set by the most recent call to #updateTexImage.

This timestamp is in nanoseconds, and is normally monotonically increasing. The timestamp should be unaffected by time-of-day adjustments. The specific meaning and zero point of the timestamp depends on the source providing images to the SurfaceTexture. Unless otherwise specified by the image source, timestamps cannot generally be compared across SurfaceTexture instances, or across multiple program invocations. It is mostly useful for determining time offsets between subsequent frames.

For camera sources, timestamps should be strictly monotonic. Timestamps from MediaPlayer sources may be reset when the playback position is set. For EGL and Vulkan producers, the timestamp is the desired present time set with the EGL_ANDROID_presentation_time or VK_GOOGLE_display_timing extensions.

Java documentation for android.graphics.SurfaceTexture.getTimestamp().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to