SessionConfig

@RequiresApi(21) class SessionConfig
kotlin.Any
   ↳ androidx.camera.core.impl.SessionConfig

Configurations needed for a capture session.

The SessionConfig contains all the android.hardware.camera2 parameters that are required to initialize a android.hardware.camera2.CameraCaptureSession and issue a .

Summary

Nested classes

Builder for easy modification/rebuilding of a SessionConfig.

abstract

Callback for errors that occur when accessing the session config.

abstract

Interface for unpacking a configuration into a SessionConfig.

abstract

The output configuration associated with the DeferrableSurface that will be used to create the configuration needed to open a camera session.

Builder for combining multiple instances of SessionConfig.

Public methods
static SessionConfig

Returns an instance of a session configuration with minimal configurations.

MutableList<StateCallback!>

Obtains all registered CameraDevice.StateCallback callbacks.

MutableList<SessionConfig.ErrorListener!>

Obtains all registered ErrorListener callbacks.

Config

InputConfiguration?

MutableList<SessionConfig.OutputConfig!>

MutableList<CameraCaptureCallback!>

Obtains all registered CameraCaptureCallback callbacks for repeating requests.

CaptureConfig

MutableList<StateCallback!>

Obtains all registered CameraCaptureSession.StateCallback callbacks.

MutableList<CameraCaptureCallback!>

Obtains all registered CameraCaptureCallback callbacks for single requests.

MutableList<DeferrableSurface!>

Returns all DeferrableSurfaces that are used to configure the session.

Int

Public methods

defaultEmptySessionConfig

@NonNull static fun defaultEmptySessionConfig(): SessionConfig

Returns an instance of a session configuration with minimal configurations.

getDeviceStateCallbacks

@NonNull fun getDeviceStateCallbacks(): MutableList<StateCallback!>

Obtains all registered CameraDevice.StateCallback callbacks.

getErrorListeners

@NonNull fun getErrorListeners(): MutableList<SessionConfig.ErrorListener!>

Obtains all registered ErrorListener callbacks.

getImplementationOptions

@NonNull fun getImplementationOptions(): Config

getInputConfiguration

@Nullable fun getInputConfiguration(): InputConfiguration?

getOutputConfigs

@NonNull fun getOutputConfigs(): MutableList<SessionConfig.OutputConfig!>

getRepeatingCameraCaptureCallbacks

@NonNull fun getRepeatingCameraCaptureCallbacks(): MutableList<CameraCaptureCallback!>

Obtains all registered CameraCaptureCallback callbacks for repeating requests.

getRepeatingCaptureConfig

@NonNull fun getRepeatingCaptureConfig(): CaptureConfig

getSessionStateCallbacks

@NonNull fun getSessionStateCallbacks(): MutableList<StateCallback!>

Obtains all registered CameraCaptureSession.StateCallback callbacks.

getSingleCameraCaptureCallbacks

@NonNull fun getSingleCameraCaptureCallbacks(): MutableList<CameraCaptureCallback!>

Obtains all registered CameraCaptureCallback callbacks for single requests.

getSurfaces

@NonNull fun getSurfaces(): MutableList<DeferrableSurface!>

Returns all DeferrableSurfaces that are used to configure the session. It includes both the DeferrableSurface of the all OutputConfigs and its shared surfaces.

getTemplateType

fun getTemplateType(): Int