public class SCaptureFailure extends Object
CaptureFailures are produced by a SCameraDevice
if processing a
SCaptureRequest
fails, either partially or fully. Use getReason()
to determine the specific nature of the failed capture.
Receiving a SCaptureFailure means that the metadata associated with that frame number
has been dropped -- no SCaptureResult
with the same frame number will be
produced.
Modifier and Type | Field and Description |
---|---|
static int |
REASON_ERROR
The
SCaptureResult has been dropped this frame only due to an error
in the framework. |
static int |
REASON_FLUSHED
The capture has failed due to a
SCameraCaptureSession.abortCaptures() call from the
application. |
Modifier and Type | Method and Description |
---|---|
long |
getFrameNumber()
Get the frame number associated with this failed capture.
|
int |
getReason()
Determine why the request was dropped, whether due to an error or to a user
action.
|
SCaptureRequest |
getRequest()
Get the request associated with this failed capture.
|
int |
getSequenceId()
The sequence ID for this failed capture that was returned by the
SCameraCaptureSession.capture(com.samsung.android.sdk.camera.SCaptureRequest, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler) family of functions. |
boolean |
wasImageCaptured()
Determine if the image was captured from the camera.
|
public static final int REASON_ERROR
SCaptureResult
has been dropped this frame only due to an error
in the framework.getReason()
,
Constant Field Valuespublic static final int REASON_FLUSHED
SCameraCaptureSession.abortCaptures()
call from the
application.getReason()
,
Constant Field Valuespublic SCaptureRequest getRequest()
Whenever a request is unsuccessfully captured, with
SCameraCaptureSession.CaptureCallback.onCaptureFailed(com.samsung.android.sdk.camera.SCameraCaptureSession, com.samsung.android.sdk.camera.SCaptureRequest, com.samsung.android.sdk.camera.SCaptureFailure)
,
the failed capture
's getRequest()
will return that request
.
In particular,
cameraDevice.capture(someRequest, new CaptureCallback() {
@Override
void onCaptureFailed(SCaptureRequest myRequest, SCaptureFailure myFailure) {
assert(myFailure.getRequest.equals(myRequest) == true);
}
};
null
.public long getFrameNumber()
Whenever a request has been processed, regardless of failed capture or success, it gets a unique frame number assigned to its future result/failed capture.
This value monotonically increments, starting with 0,
for every new result or failure; and the scope is the lifetime of the
SCameraDevice
.
public int getReason()
REASON_*
integer constants.REASON_ERROR
,
REASON_FLUSHED
public boolean wasImageCaptured()
If the image was not captured, no image buffers will be available. If the image was captured, then image buffers may be available.
public int getSequenceId()
SCameraCaptureSession.capture(com.samsung.android.sdk.camera.SCaptureRequest, com.samsung.android.sdk.camera.SCameraCaptureSession.CaptureCallback, android.os.Handler)
family of functions.
The sequence ID is a unique monotonically increasing value starting from 0, incremented every time a new group of requests is submitted to the SCameraDevice.
SCameraCaptureSession.CaptureCallback.onCaptureSequenceCompleted(com.samsung.android.sdk.camera.SCameraCaptureSession, int, long)
Copyright © Samsung Electronics, Co., Ltd. All rights reserved.