# Print output for @column tags ?>
public
static
abstract
class
CameraExtensionSession.ExtensionCaptureCallback
extends Object
java.lang.Object | |
↳ | android.hardware.camera2.CameraExtensionSession.ExtensionCaptureCallback |
A callback object for tracking the progress of a
CaptureRequest
submitted to the camera device.
This callback is invoked when a request triggers a capture to start, and when the device-specific Extension post processing begins. In case of an error capturing an image, the error method is triggered instead of the completion method.
See also:
Public constructors | |
---|---|
ExtensionCaptureCallback()
|
Public methods | |
---|---|
void
|
onCaptureFailed(CameraExtensionSession session, CaptureRequest request)
This method is called instead of
|
void
|
onCaptureProcessStarted(CameraExtensionSession session, CaptureRequest request)
This method is called when an image (or images in case of multi-frame capture) is captured and device-specific extension processing is triggered. |
void
|
onCaptureSequenceAborted(CameraExtensionSession session, int sequenceId)
This method is called when a capture sequence aborts. |
void
|
onCaptureSequenceCompleted(CameraExtensionSession session, int sequenceId)
This method is called independently of the others in ExtensionCaptureCallback, when a capture sequence finishes. |
void
|
onCaptureStarted(CameraExtensionSession session, CaptureRequest request, long timestamp)
This method is called when the camera device has started capturing the initial input image of the device-specific extension post-process request. |
Inherited methods | |
---|---|
public ExtensionCaptureCallback ()
public void onCaptureFailed (CameraExtensionSession session, CaptureRequest request)
This method is called instead of
onCaptureProcessStarted(CameraExtensionSession, CaptureRequest)
when the camera device failed
to produce the required input for the device-specific extension. The
cause could be a failed camera capture request, a failed
capture result or dropped camera frame.
Other requests are unaffected, and some or all image buffers from the capture may have been pushed to their respective output streams.
The default implementation of this method does nothing.
Parameters | |
---|---|
session |
CameraExtensionSession : the session received during
StateCallback#onConfigured(CameraExtensionSession)
This value cannot be null . |
request |
CaptureRequest : The request that was given to the CameraDevice
This value cannot be null . |
public void onCaptureProcessStarted (CameraExtensionSession session, CaptureRequest request)
This method is called when an image (or images in case of multi-frame capture) is captured and device-specific extension processing is triggered.
Each request will generate at most 1
onCaptureProcessStarted(CameraExtensionSession, CaptureRequest)
.
The default implementation of this method does nothing.
Parameters | |
---|---|
session |
CameraExtensionSession : the session received during
StateCallback#onConfigured(CameraExtensionSession)
This value cannot be null . |
request |
CaptureRequest : The request that was given to the CameraExtensionSession
This value cannot be null . |
public void onCaptureSequenceAborted (CameraExtensionSession session, int sequenceId)
This method is called when a capture sequence aborts.
Due to the asynchronous nature of the camera device, not all
submitted captures are immediately processed. It is possible to
clear out the pending requests by a variety of operations such
as CameraExtensionSession#stopRepeating
. When such an event
happens, onCaptureProcessStarted(CameraExtensionSession, CaptureRequest)
will not be called.
The default implementation does nothing.
Parameters | |
---|---|
session |
CameraExtensionSession : the session received during
StateCallback#onConfigured(CameraExtensionSession)
This value cannot be null . |
sequenceId |
int : A sequence ID returned by the CameraExtensionSession.capture(CaptureRequest, Executor, CameraExtensionSession.ExtensionCaptureCallback)
family of functions. |
public void onCaptureSequenceCompleted (CameraExtensionSession session, int sequenceId)
This method is called independently of the others in ExtensionCaptureCallback, when a capture sequence finishes.
In total, there will be at least one
onCaptureProcessStarted(CameraExtensionSession, CaptureRequest)
/onCaptureFailed(CameraExtensionSession, CaptureRequest)
invocation before this callback is triggered. If the capture
sequence is aborted before any requests have begun processing,
onCaptureSequenceAborted(CameraExtensionSession, int)
is invoked instead.
The default implementation does nothing.
Parameters | |
---|---|
session |
CameraExtensionSession : the session received during
StateCallback#onConfigured(CameraExtensionSession)
This value cannot be null . |
sequenceId |
int : A sequence ID returned by the CameraExtensionSession.capture(CaptureRequest, Executor, CameraExtensionSession.ExtensionCaptureCallback)
family of functions. |
public void onCaptureStarted (CameraExtensionSession session, CaptureRequest request, long timestamp)
This method is called when the camera device has started capturing the initial input image of the device-specific extension post-process request.
This callback is invoked right as the capture of a frame begins, so it is the most appropriate time for playing a shutter sound, or triggering UI indicators of capture.
The request that is being used for this capture is provided, along with the actual timestamp for the start of exposure.
The default implementation of this method does nothing.
Parameters | |
---|---|
session |
CameraExtensionSession : the session received during
StateCallback#onConfigured(CameraExtensionSession)
This value cannot be null . |
request |
CaptureRequest : the request for the capture that just begun
This value cannot be null . |
timestamp |
long : the timestamp at start of capture for repeating
request or the timestamp at start of capture of the
first frame in a multi-frame capture. |