OnActiveOutputSurfacesListener


interface OnActiveOutputSurfacesListener
android.hardware.camera2.MultiResolutionImageReader.OnActiveOutputSurfacesListener

Callback interface for being notified of the surfaces used for the capture.

The onActiveOutputSurfaces is called per request on this MultiResolutionImageReader, to indicate which underlying ImageReader surfaces are outputting images.

Summary

Public methods
abstract Unit
onActiveOutputSurfaces(activeOutputSurfaces: MutableList<Surface!>, timestamp: Long, frameNumber: Long)

Callback that is called to notify the active surfaces that the application should expect to receive images from.

Public methods

onActiveOutputSurfaces

abstract fun onActiveOutputSurfaces(
    activeOutputSurfaces: MutableList<Surface!>,
    timestamp: Long,
    frameNumber: Long
): Unit

Callback that is called to notify the active surfaces that the application should expect to receive images from.

If the MultiResolutionImageReader is created with enableConcurrency set to true, multiple underlying readers may produce images for a single capture request. The application can listen to this callback to know which readers to expect an output image from.

If the MultiResolutionImageReader is created without enableConcurrency set to true, this callback will not the triggered.

For each of the activeOutputSurfaces, a ImageReader.onImageAvailableListener.onImageAvailable will be called. Or in rare cases, android.hardware.camera2.CameraCaptureSession#onCaptureBufferLost is called if the buffer is dropped.

The timestamp can be used to correlate between the activeOutputSurfaces and the images being output from those surfaces. The timestamp can be start of exposure or start of readout depending on whether android.hardware.camera2.params.OutputConfiguration#setReadoutTimestampEnabled was called on the outputs. Similarly, the timestamp can be either in the same time base as in android.os.SystemClock#uptimeMillis or android.os.SystemClock#elapsedRealtime depending on the timestamp base of the outputs. See OutputConfiguration#setTimestampBase for details.

Parameters
activeOutputSurfaces MutableList<Surface!>: the active output surfaces to expect an output from.
This value cannot be null.
timestamp Long: the timestamp of the capture.
frameNumber Long: the frame number of this capture.