CaptureConfig

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

Configurations needed for a capture request.

The CaptureConfig contains all the android.hardware.camera2 parameters that are required to issue a CaptureRequest.

Summary

Nested classes

Builder for easy modification/rebuilding of a CaptureConfig.

abstract

Interface for unpacking a configuration into a CaptureConfig.

Constants
static Int

Indicates template type is not set.

Public methods
static CaptureConfig

Returns an instance of a capture configuration with minimal configurations.

MutableList<CameraCaptureCallback!>

Obtains all registered CameraCaptureCallback callbacks.

CameraCaptureResult?

Returns an instance of CameraCaptureResult for reprocessing capture request.

Config

MutableList<DeferrableSurface!>

Get all the surfaces that the request will write data to.

TagBundle

Int

Gets the template type.

Boolean

Properties
static Config.Option<Int!>!

Sets the compression quality of the captured JPEG image.

static Config.Option<Int!>!

Request that the implementation rotate the image.

Constants

TEMPLATE_TYPE_NONE

static val TEMPLATE_TYPE_NONE: Int

Indicates template type is not set.

Value: -1

Public methods

defaultEmptyCaptureConfig

@NonNull static fun defaultEmptyCaptureConfig(): CaptureConfig

Returns an instance of a capture configuration with minimal configurations.

getCameraCaptureCallbacks

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

Obtains all registered CameraCaptureCallback callbacks.

getCameraCaptureResult

@Nullable fun getCameraCaptureResult(): CameraCaptureResult?

Returns an instance of CameraCaptureResult for reprocessing capture request.

Return
CameraCaptureResult? CameraCaptureResult.

getImplementationOptions

@NonNull fun getImplementationOptions(): Config

getSurfaces

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

Get all the surfaces that the request will write data to.

getTagBundle

@NonNull fun getTagBundle(): TagBundle

getTemplateType

fun getTemplateType(): Int

Gets the template type.

If not set, returns TEMPLATE_TYPE_NONE.

isUseRepeatingSurface

fun isUseRepeatingSurface(): Boolean

Properties

OPTION_JPEG_QUALITY

static val OPTION_JPEG_QUALITY: Config.Option<Int!>!

Sets the compression quality of the captured JPEG image. See CaptureRequest#JPEG_QUALITY. Option: camerax.core.captureConfig.jpegQuality

OPTION_ROTATION

static val OPTION_ROTATION: Config.Option<Int!>!

Request that the implementation rotate the image.

Currently only applicable for androidx.camera.core.ImageProxy which are of JPEG format. Option: camerax.core.rotation