ExtensionSessionConfiguration


public final class ExtensionSessionConfiguration
extends Object

java.lang.Object
   ↳ android.hardware.camera2.params.ExtensionSessionConfiguration


A class that aggregates all supported arguments for CameraExtensionSession initialization.

Summary

Public constructors

ExtensionSessionConfiguration(int extension, List<OutputConfiguration> outputs, Executor executor, CameraExtensionSession.StateCallback listener)

Create a new ExtensionSessionConfiguration

Public methods

void clearColorSpace()

Clear the color space, such that the default color space will be used.

ColorSpace getColorSpace()

Return the current color space.

Executor getExecutor()

Retrieve the Executor for the CameraExtensionSession instance.

int getExtension()

Retrieve the extension type.

List<OutputConfiguration> getOutputConfigurations()

Retrieve the OutputConfiguration list for the capture session.

OutputConfiguration getPostviewOutputConfiguration()

Get the postview for still capture output configuration.

CameraExtensionSession.StateCallback getStateCallback()

Retrieve the CameraCaptureSession.StateCallback listener.

void setColorSpace(ColorSpace.Named colorSpace)

Set a specific device-supported color space.

void setPostviewOutputConfiguration(OutputConfiguration postviewOutput)

Set the postview for still capture output configuration.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

ExtensionSessionConfiguration

Added in API level 31
public ExtensionSessionConfiguration (int extension, 
                List<OutputConfiguration> outputs, 
                Executor executor, 
                CameraExtensionSession.StateCallback listener)

Create a new ExtensionSessionConfiguration

Parameters
extension int: to be used for processing Value is either 0 or a combination of CameraExtensionCharacteristics.EXTENSION_AUTOMATIC, CameraExtensionCharacteristics.EXTENSION_FACE_RETOUCH, CameraExtensionCharacteristics.EXTENSION_BOKEH, CameraExtensionCharacteristics.EXTENSION_HDR, and CameraExtensionCharacteristics.EXTENSION_NIGHT

outputs List: a list of output configurations for the capture session This value cannot be null.

executor Executor: the executor which will be used for invoking the callbacks This value cannot be null.

listener CameraExtensionSession.StateCallback: callbacks to be invoked when the state of the CameraExtensionSession changes This value cannot be null.

Public methods

clearColorSpace

Added in API level 35
public void clearColorSpace ()

Clear the color space, such that the default color space will be used.

getColorSpace

Added in API level 35
public ColorSpace getColorSpace ()

Return the current color space.

Returns
ColorSpace the currently set color space, or null if not set

getExecutor

Added in API level 31
public Executor getExecutor ()

Retrieve the Executor for the CameraExtensionSession instance.

Returns
Executor The Executor on which the callback will be invoked. This value cannot be null.

getOutputConfigurations

Added in API level 31
public List<OutputConfiguration> getOutputConfigurations ()

Retrieve the OutputConfiguration list for the capture session.

Returns
List<OutputConfiguration> A list of output configurations for the capture session. This value cannot be null.

getPostviewOutputConfiguration

Added in API level 34
public OutputConfiguration getPostviewOutputConfiguration ()

Get the postview for still capture output configuration.

Returns
OutputConfiguration output configuration for postview This value may be null.

getStateCallback

Added in API level 31
public CameraExtensionSession.StateCallback getStateCallback ()

Retrieve the CameraCaptureSession.StateCallback listener.

Returns
CameraExtensionSession.StateCallback A state callback interface implementation. This value cannot be null.

setColorSpace

Added in API level 35
public void setColorSpace (ColorSpace.Named colorSpace)

Set a specific device-supported color space.

Clients can choose from any profile advertised as supported in CameraCharacteristics.REQUEST_AVAILABLE_COLOR_SPACE_PROFILES queried using ColorSpaceProfiles.getSupportedColorSpaces. When set, the colorSpace will override the default color spaces of the output targets, or the color space implied by the dataSpace passed into an ImageReader's constructor.

Parameters
colorSpace ColorSpace.Named: This value cannot be null.

setPostviewOutputConfiguration

Added in API level 34
public void setPostviewOutputConfiguration (OutputConfiguration postviewOutput)

Set the postview for still capture output configuration.

Parameters
postviewOutput OutputConfiguration: output configuration for postview This value may be null.