MultiResolutionImageReader.OnActiveOutputSurfacesListener


public static interface MultiResolutionImageReader.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 void onActiveOutputSurfaces(List<Surface> activeOutputSurfaces, long timestamp, long frameNumber)

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

Public methods

onActiveOutputSurfaces

public abstract void onActiveOutputSurfaces (List<Surface> activeOutputSurfaces, 
                long timestamp, 
                long frameNumber)

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 ERROR(/ImageReader.onImageAvailableListener.onImageAvailable) will be called. Or in rare cases, ERROR(CameraCaptureSession.onCaptureBufferLost/android.hardware.camera2.CameraCaptureSession#onCaptureBufferLost 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 OutputConfiguration.setReadoutTimestampEnabled(boolean) was called on the outputs. Similarly, the timestamp can be either in the same time base as in SystemClock.uptimeMillis() or SystemClock.elapsedRealtime() depending on the timestamp base of the outputs. See ERROR(/OutputConfiguration#setTimestampBase) for details.

Parameters
activeOutputSurfaces List: 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.