java.lang.Object | |
↳ | android.hardware.camera2.CaptureRequest.Builder |
A builder for capture requests.
To obtain a builder instance, use the
createCaptureRequest(int)
method, which initializes the
request fields to one of the templates defined in CameraDevice
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a surface to the list of targets for this request The Surface added must be one of the surfaces included in the most
recent call to | |||||||||||
Build a request using the current target Surfaces and settings.
| |||||||||||
Get a capture request field value.
| |||||||||||
Remove a surface from the list of targets for this request. | |||||||||||
Set a capture request field to a value.
| |||||||||||
Set a tag for this request.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add a surface to the list of targets for this request
The Surface added must be one of the surfaces included in the most
recent call to createCaptureSession(List
, when the
request is given to the camera device.
Adding a target more than once has no effect.
outputTarget | Surface to use as an output target for this request |
---|
Build a request using the current target Surfaces and settings.
Note that, although it is possible to create a CaptureRequest
with no target
Surface
s, passing such a request into capture(CaptureRequest, CameraCaptureSession.CaptureCallback, Handler)
,
captureBurst(List
,
setRepeatingBurst(List
, or
setRepeatingRequest(CaptureRequest, CameraCaptureSession.CaptureCallback, Handler)
will cause that method to throw an
IllegalArgumentException
.
Get a capture request field value. The field definitions can be
found in CaptureRequest
.
key | The metadata field to read. |
---|
null
if the field is not set.
IllegalArgumentException | if the key was not valid |
---|
Remove a surface from the list of targets for this request.
Removing a target that is not currently added has no effect.
outputTarget | Surface to use as an output target for this request |
---|
Set a capture request field to a value. The field definitions can be
found in CaptureRequest
.
key | The metadata field to write. |
---|---|
value | The value to set the field to, which must be of a matching type to the key. |
Set a tag for this request.
This tag is not used for anything by the camera device, but can be
used by an application to easily identify a CaptureRequest when it is
returned by
CaptureCallback.onCaptureCompleted
tag | an arbitrary Object to store with this request |
---|