PreviewConfig

@RequiresApi(21) class PreviewConfig : UseCaseConfig<Preview!>, ImageOutputConfig, ThreadConfig
kotlin.Any
   ↳ androidx.camera.core.impl.PreviewConfig

Configuration for a Preview use case.

Summary

Inherited constants
Public constructors
PreviewConfig(@NonNull config: OptionsBundle)

Creates a new configuration instance.

Public methods
CaptureProcessor?
getCaptureProcessor(@Nullable valueIfMissing: CaptureProcessor?)

Returns the CaptureProcessor.

CaptureProcessor

Returns the CaptureProcessor.

Config

ImageInfoProcessor?
getImageInfoProcessor(@Nullable valueIfMissing: ImageInfoProcessor?)

Returns the ImageInfoProcessor.

Int

Retrieves the format of the image that is fed as input.

Inherited functions
Properties
static Config.Option<ImageInfoProcessor!>!

static Config.Option<CaptureProcessor!>!

Inherited properties

Public constructors

PreviewConfig

PreviewConfig(@NonNull config: OptionsBundle)

Creates a new configuration instance.

Public methods

getCaptureProcessor

@Nullable fun getCaptureProcessor(@Nullable valueIfMissing: CaptureProcessor?): CaptureProcessor?

Returns the CaptureProcessor.

Parameters
valueIfMissing CaptureProcessor?: The value to return if this configuration option has not been set.
Return
CaptureProcessor? The stored value or valueIfMissing if the value does not exist in this configuration.

getCaptureProcessor

@NonNull fun getCaptureProcessor(): CaptureProcessor

Returns the CaptureProcessor.

Return
CaptureProcessor The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getConfig

@NonNull fun getConfig(): Config

getImageInfoProcessor

@Nullable fun getImageInfoProcessor(@Nullable valueIfMissing: ImageInfoProcessor?): ImageInfoProcessor?

Returns the ImageInfoProcessor.

Return
ImageInfoProcessor? The stored value, if it exists in this configuration.

getInputFormat

fun getInputFormat(): Int

Retrieves the format of the image that is fed as input.

This should be YUV_420_888, when processing is run on the image. Otherwise it is PRIVATE.

Properties

IMAGE_INFO_PROCESSOR

static val IMAGE_INFO_PROCESSOR: Config.Option<ImageInfoProcessor!>!

OPTION_PREVIEW_CAPTURE_PROCESSOR

static val OPTION_PREVIEW_CAPTURE_PROCESSOR: Config.Option<CaptureProcessor!>!