public final class

CaptureConfig.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.CaptureConfig.Builder

Overview

Builder for easy modification/rebuilding of a CaptureConfig.

Summary

Constructors
publicBuilder()

Methods
public voidaddAllCameraCaptureCallbacks(java.util.Collection<CameraCaptureCallback> cameraCaptureCallbacks)

Adds all callbacks.

public voidaddCameraCaptureCallback(CameraCaptureCallback cameraCaptureCallback)

Adds a callback.

public voidaddImplementationOptions(Config config)

Add a set of implementation specific options to the request.

public voidaddSurface(DeferrableSurface surface)

Add a surface that the request will write data to.

public CaptureConfigbuild()

Builds an instance of a CaptureConfig that has all the combined parameters of the CaptureConfig that have been added to the Builder.

public voidclearSurfaces()

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

public static CaptureConfig.BuildercreateFrom(UseCaseConfig<UseCase> config)

Creates a CaptureConfig.Builder from a UseCaseConfig.

public static CaptureConfig.Builderfrom(CaptureConfig base)

Create a CaptureConfig.Builder from a CaptureConfig

public ConfiggetImplementationOptions()

public java.util.Set<DeferrableSurface>getSurfaces()

Gets the surfaces attached to the request.

public voidremoveSurface(DeferrableSurface surface)

Remove a surface that the request will write data to.

public voidsetImplementationOptions(Config config)

public voidsetTag(java.lang.Object tag)

public voidsetTemplateType(int templateType)

Set the template characteristics of the CaptureConfig.

public voidsetUseRepeatingSurface(boolean useRepeatingSurface)

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

Constructors

public Builder()

Methods

public static CaptureConfig.Builder createFrom(UseCaseConfig<UseCase> config)

Creates a CaptureConfig.Builder from a UseCaseConfig.

Populates the builder with all the properties defined in the base configuration.

public static CaptureConfig.Builder from(CaptureConfig base)

Create a CaptureConfig.Builder from a CaptureConfig

public void setTemplateType(int templateType)

Set the template characteristics of the CaptureConfig.

Parameters:

templateType: Template constant that must match those defined by CameraDevice

public void addCameraCaptureCallback(CameraCaptureCallback cameraCaptureCallback)

Adds a callback.

public void addAllCameraCaptureCallbacks(java.util.Collection<CameraCaptureCallback> cameraCaptureCallbacks)

Adds all callbacks.

public void addSurface(DeferrableSurface surface)

Add a surface that the request will write data to.

public void removeSurface(DeferrableSurface surface)

Remove a surface that the request will write data to.

public void clearSurfaces()

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

public java.util.Set<DeferrableSurface> getSurfaces()

Gets the surfaces attached to the request.

public void setImplementationOptions(Config config)

public void addImplementationOptions(Config config)

Add a set of implementation specific options to the request.

public Config getImplementationOptions()

public void setUseRepeatingSurface(boolean useRepeatingSurface)

public void setTag(java.lang.Object tag)

public CaptureConfig build()

Builds an instance of a CaptureConfig that has all the combined parameters of the CaptureConfig that have been added to the Builder.