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
|
getPostviewOutputConfiguration()
Get the postview for still capture output configuration. |
CaptureRequest
|
getSessionWideParams()
Retrieve the session wide camera parameters (see |
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. |
void
|
setSessionWideParams(CaptureRequest sessionCaptureParams)
Sets the session wide camera parameters (see |
Inherited methods | |
|---|---|
Public constructors
ExtensionSessionConfiguration
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 the following:
|
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
public void clearColorSpace ()
Clear the color space, such that the default color space will be used.
getColorSpace
public ColorSpace getColorSpace ()
Return the current color space.
| Returns | |
|---|---|
ColorSpace |
the currently set color space, or null if not set |
getExecutor
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. |
getExtension
public int getExtension ()
Retrieve the extension type.
| Returns | |
|---|---|
int |
the extension type.
Value is either 0 or a combination of the following:
|
getOutputConfigurations
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
public OutputConfiguration getPostviewOutputConfiguration ()
Get the postview for still capture output configuration.
| Returns | |
|---|---|
OutputConfiguration |
output configuration for postview.
This value may be null. |
getSessionWideParams
public CaptureRequest getSessionWideParams ()
Retrieve the session wide camera parameters (see CaptureRequest).
| Returns | |
|---|---|
CaptureRequest |
A capture request that includes the initial values for any available
session wide capture keys.
This value may be null. |
getStateCallback
public CameraExtensionSession.StateCallback getStateCallback ()
Retrieve the CameraCaptureSession.StateCallback listener.
| Returns | |
|---|---|
CameraExtensionSession.StateCallback |
A state callback interface implementation.
This value cannot be null. |
setColorSpace
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
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. |
setSessionWideParams
public void setSessionWideParams (CaptureRequest sessionCaptureParams)
Sets the session wide camera parameters (see CaptureRequest). This argument can
be set for every supported session type and will be passed to the camera device as part
of the capture session initialization. Session parameters are a subset of the available
capture request parameters (see CameraCharacteristics.getAvailableSessionKeys)
and their application can introduce internal camera delays. To improve camera performance
it is suggested to change them sparingly within the lifetime of the capture session and
to pass their initial values as part of this method.
| Parameters | |
|---|---|
sessionCaptureParams |
CaptureRequest: A capture request that includes the initial values for any
available session wide capture keys. Tags
(see CaptureRequest.Builder.setTag) and output targets
(see CaptureRequest.Builder.addTarget) are ignored if set.
Parameter values not part of
CameraCharacteristics.getAvailableSessionKeys will also be
ignored. It is recommended to build the session parameters using
the same template type as the initial capture request, so that the
session and initial request parameters match as much as possible.
This value cannot be null. |