ImageCaptureLatencyEstimate


public 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

static final long

The capture latency is unsupported or undefined

static final @NonNull ImageCaptureLatencyEstimate

The image capture latency estimate is unsupported or undefined

static final long

The processing latency is unsupported or undefined

Public constructors

ImageCaptureLatencyEstimate(
    long captureLatencyMillis,
    long processingLatencyMillis
)

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

Public methods

boolean
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
@NonNull String

Constants

UNDEFINED_CAPTURE_LATENCY

Added in 1.4.0
public static final long UNDEFINED_CAPTURE_LATENCY = -1

The capture latency is unsupported or undefined

UNDEFINED_IMAGE_CAPTURE_LATENCY

Added in 1.4.0
public static final @NonNull ImageCaptureLatencyEstimate UNDEFINED_IMAGE_CAPTURE_LATENCY

The image capture latency estimate is unsupported or undefined

UNDEFINED_PROCESSING_LATENCY

Added in 1.4.0
public static final long UNDEFINED_PROCESSING_LATENCY = -1

The processing latency is unsupported or undefined

Public constructors

ImageCaptureLatencyEstimate

Added in 1.4.0
public ImageCaptureLatencyEstimate(
    long captureLatencyMillis,
    long processingLatencyMillis
)

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
long captureLatencyMillis

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

long processingLatencyMillis

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

Public methods

equals

public boolean equals(Object o)

getCaptureLatencyMillis

Added in 1.4.0
public long getCaptureLatencyMillis()

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
public long getProcessingLatencyMillis()

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
public long getTotalCaptureLatencyMillis()

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

public int hashCode()

toString

public @NonNull String toString()