public class

PreviewExtender.PreviewExtenderAdapter

extends CameraEventCallback

implements UseCase.EventCallback

 java.lang.Object

androidx.camera.camera2.impl.CameraEventCallback

↳androidx.camera.extensions.PreviewExtender.PreviewExtenderAdapter

Overview

An implementation to adapt the OEM provided implementation to core.

Summary

Constructors
publicPreviewExtenderAdapter(PreviewExtenderImpl impl, Context context, PreviewExtender.CloseableProcessor closeableProcessor)

Methods
public voidonAttach(CameraInfo cameraInfo)

public voidonDetach()

public CaptureConfigonDisableSession()

This will be invoked once before the CameraCaptureSession is closed.

public CaptureConfigonEnableSession()

This will be invoked once after a CameraCaptureSession is created.

public CaptureConfigonPresetSession()

This will be invoked before creating a CameraCaptureSession.

public CaptureConfigonRepeating()

This callback will be invoked before starting the repeating request in the CameraCaptureSession.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public PreviewExtenderAdapter(PreviewExtenderImpl impl, Context context, PreviewExtender.CloseableProcessor closeableProcessor)

Methods

public void onAttach(CameraInfo cameraInfo)

public void onDetach()

public CaptureConfig onPresetSession()

This will be invoked before creating a CameraCaptureSession. The returned parameter in CaptureConfig will be passed to the camera device as part of the capture session initialization via setSessionParameters(). The valid parameter is a subset of the available capture request parameters.

Returns:

CaptureConfig The request information to customize the session.

public CaptureConfig onEnableSession()

This will be invoked once after a CameraCaptureSession is created. The returned parameter in CaptureConfig will be used to generate a single request to the current configured camera device. The generated request would be submitted to camera before process other single request.

Returns:

CaptureConfig The request information to customize the session.

public CaptureConfig onDisableSession()

This will be invoked once before the CameraCaptureSession is closed. The returned parameter in CaptureConfig will be used to generate a single request to the current configured camera device. The generated request would be submitted to camera before the capture session was closed.

Returns:

CaptureConfig The request information to customize the session.

public CaptureConfig onRepeating()

This callback will be invoked before starting the repeating request in the CameraCaptureSession. The returned CaptureConfig will be used to generate a capture request, and would be used in setRepeatingRequest().

Returns:

CaptureConfig The request information to customize the session.