Camera2Config
public
final
class
Camera2Config
extends Object
implements
Config
| java.lang.Object | |
| ↳ | androidx.camera.camera2.Camera2Config |
Configuration options related to the android.hardware.camera2 APIs.
Summary
Nested classes | |
|---|---|
class |
Camera2Config.Extender
Extends a |
Public constructors | |
|---|---|
Camera2Config(Config config)
Creates a Camera2Config for reading Camera2 options from the given config. |
|
Public methods | |
|---|---|
<ValueT>
ValueT
|
getCaptureRequestOption(Key<ValueT> key, ValueT valueIfMissing)
Returns a value for the given |
CameraDevice.StateCallback
|
getDeviceStateCallback(CameraDevice.StateCallback valueIfMissing)
Returns the stored |
CameraCaptureSession.CaptureCallback
|
getSessionCaptureCallback(CameraCaptureSession.CaptureCallback valueIfMissing)
Returns the stored |
CameraCaptureSession.StateCallback
|
getSessionStateCallback(CameraCaptureSession.StateCallback valueIfMissing)
Returns the stored |
Inherited methods | |
|---|---|
Public constructors
Camera2Config
public Camera2Config (Config config)
Creates a Camera2Config for reading Camera2 options from the given config.
| Parameters | |
|---|---|
config |
Config: The config that potentially contains Camera2 options.
|
Public methods
getCaptureRequestOption
public ValueT getCaptureRequestOption (Key<ValueT> key, ValueT valueIfMissing)
Returns a value for the given CaptureRequest.Key.
| Parameters | |
|---|---|
key |
Key: The key to retrieve. |
valueIfMissing |
ValueT: The value to return if this configuration option has not been set. |
| Returns | |
|---|---|
ValueT |
The stored value or valueIfMissing if the value does not exist in this
configuration.
|
getDeviceStateCallback
public CameraDevice.StateCallback getDeviceStateCallback (CameraDevice.StateCallback valueIfMissing)
Returns the stored CameraDevice.StateCallback.
| Parameters | |
|---|---|
valueIfMissing |
CameraDevice.StateCallback: The value to return if this configuration option has not been set. |
| Returns | |
|---|---|
CameraDevice.StateCallback |
The stored value or valueIfMissing if the value does not exist in this
configuration.
|
getSessionCaptureCallback
public CameraCaptureSession.CaptureCallback getSessionCaptureCallback (CameraCaptureSession.CaptureCallback valueIfMissing)
Returns the stored CameraCaptureSession.CaptureCallback.
| Parameters | |
|---|---|
valueIfMissing |
CameraCaptureSession.CaptureCallback: The value to return if this configuration option has not been set. |
| Returns | |
|---|---|
CameraCaptureSession.CaptureCallback |
The stored value or valueIfMissing if the value does not exist in this
configuration.
|
getSessionStateCallback
public CameraCaptureSession.StateCallback getSessionStateCallback (CameraCaptureSession.StateCallback valueIfMissing)
Returns the stored CameraCaptureSession.StateCallback.
| Parameters | |
|---|---|
valueIfMissing |
CameraCaptureSession.StateCallback: The value to return if this configuration option has not been set. |
| Returns | |
|---|---|
CameraCaptureSession.StateCallback |
The stored value or valueIfMissing if the value does not exist in this
configuration.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.