ImageCaptureLatencyEstimate


@RequiresApi(value = 21)
class ImageCaptureLatencyEstimate


An immutable representation of the estimated duration an image capture will take capturing and processing the current scene according to the scene's lighting condition and/or camera configuration.

The latency estimate is produced by getRealtimeCaptureLatencyEstimate.

The estimate is comprised of two components: getCaptureLatencyMillis, getProcessingLatencyMillis.

Summary

Constants

const Long

The capture latency is unsupported or undefined

const ImageCaptureLatencyEstimate

The image capture latency estimate is unsupported or undefined

const Long

The processing latency is unsupported or undefined

Public constructors

ImageCaptureLatencyEstimate(
    captureLatencyMillis: Long,
    processingLatencyMillis: Long
)

Created by getRealtimeCaptureLatencyEstimate when querying for the current realtime latency estimate.

Public functions

Boolean
equals(o: Any!)
Long

Returns the estimated duration in milliseconds from when the camera begins capturing frames to the moment the camera has completed capturing frames.

Long

Returns the estimated duration in milliseconds from when the processing begins until the processing has completed and the final processed capture is available.

Long

Returns the total estimated capture duration in milliseconds.

Int
String

Constants

UNDEFINED_CAPTURE_LATENCY

Added in 1.4.0-alpha05
const val UNDEFINED_CAPTURE_LATENCY = -1: Long

The capture latency is unsupported or undefined

UNDEFINED_IMAGE_CAPTURE_LATENCY

Added in 1.4.0-alpha05
const val UNDEFINED_IMAGE_CAPTURE_LATENCYImageCaptureLatencyEstimate

The image capture latency estimate is unsupported or undefined

UNDEFINED_PROCESSING_LATENCY

Added in 1.4.0-alpha05
const val UNDEFINED_PROCESSING_LATENCY = -1: Long

The processing latency is unsupported or undefined

Public constructors

ImageCaptureLatencyEstimate

Added in 1.4.0-alpha05
ImageCaptureLatencyEstimate(
    captureLatencyMillis: Long,
    processingLatencyMillis: Long
)

Created by getRealtimeCaptureLatencyEstimate when querying for the current realtime latency estimate. This can also be used for testing. It is not necessary to explicitly construct this in any other scenario.

Parameters
captureLatencyMillis: Long

The estimated duration in milliseconds from when the camera begins capturing frames to the moment the camera has completed capturing frames.

processingLatencyMillis: Long

The estimated duration in milliseconds from when the processing begins until the processing has completed and the final processed capture is available.

Public functions

equals

fun equals(o: Any!): Boolean

getCaptureLatencyMillis

Added in 1.4.0-alpha05
fun getCaptureLatencyMillis(): Long

Returns the estimated duration in milliseconds from when the camera begins capturing frames to the moment the camera has completed capturing frames. If this estimate is not supported or not available then it will be UNDEFINED_CAPTURE_LATENCY.

getProcessingLatencyMillis

Added in 1.4.0-alpha05
fun getProcessingLatencyMillis(): Long

Returns the estimated duration in milliseconds from when the processing begins until the processing has completed and the final processed capture is available. If this estimate is not supported or not available then it will be UNDEFINED_PROCESSING_LATENCY.

getTotalCaptureLatencyMillis

Added in 1.4.0-alpha05
fun getTotalCaptureLatencyMillis(): Long

Returns the total estimated capture duration in milliseconds. This includes time spent in capturing and processing.

If either the capture latency or processing latency is undefined then the total estimate is UNDEFINED_CAPTURE_LATENCY.

hashCode

fun hashCode(): Int

toString

fun toString(): String