public static final class SCaptureRequest.Builder extends Object
To obtain a builder instance, use the
SCameraDevice.createCaptureRequest(int)
method, which initializes the
request fields to one of the templates defined in SCameraDevice
.
Modifier and Type | Method and Description |
---|---|
void |
addTarget(Surface outputTarget)
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
SCameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.samsung.android.sdk.camera.SCameraCaptureSession.StateCallback, android.os.Handler) , when the
request is given to the camera device. |
SCaptureRequest |
build()
Build a request using the current target Surfaces and settings.
|
<T> T |
get(SCaptureRequest.Key<T> key)
Get a capture request field value.
|
void |
removeTarget(Surface outputTarget)
Remove a surface from the list of targets for this request.
|
<T> void |
set(SCaptureRequest.Key<T> key,
T value)
Set a capture request field to a value.
|
void |
setTag(Object tag)
Set a tag for this request.
|
public void addTarget(Surface outputTarget)
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 SCameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.samsung.android.sdk.camera.SCameraCaptureSession.StateCallback, android.os.Handler)
, 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 requestpublic void removeTarget(Surface outputTarget)
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 requestpublic <T> void set(SCaptureRequest.Key<T> key, T value)
SCaptureRequest
.key
- The metadata field to write.value
- The value to set the field to, which must be of a matching
type to the key.public <T> T get(SCaptureRequest.Key<T> key)
SCaptureRequest
.key
- The metadata field to read.null
if the field is not set.IllegalArgumentException
- if the key was not validpublic void setTag(Object tag)
This tag is not used for anything by the camera device, but can be
used by an application to easily identify a SCaptureRequest when it is
returned by
CaptureCallback.onCaptureCompleted
tag
- an arbitrary Object to store with this requestSCaptureRequest.getTag()
public SCaptureRequest build()
Note that, although it is possible to create a SCaptureRequest
with no target
Surface
s, passing such a request into SCameraCaptureSession.capture(com.samsung.android.sdk.camera.SCaptureRequest, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler)
,
SCameraCaptureSession.captureBurst(java.util.List<com.samsung.android.sdk.camera.SCaptureRequest>, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler)
,
SCameraCaptureSession.setRepeatingBurst(java.util.List<com.samsung.android.sdk.camera.SCaptureRequest>, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler)
, or
SCameraCaptureSession.setRepeatingRequest(com.samsung.android.sdk.camera.SCaptureRequest, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler)
will cause that method to throw an
IllegalArgumentException
.
Copyright © Samsung Electronics, Co., Ltd. All rights reserved.