java.lang.Object | |
↳ | android.hardware.camera2.CameraCaptureSession.StateCallback |
A callback object for receiving updates about the state of a camera capture session.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is called when the session starts actively processing capture requests.
| |||||||||||
This method is called when the session is closed.
| |||||||||||
This method is called if the session cannot be configured as requested.
| |||||||||||
This method is called when the camera device has finished configuring itself, and the
session can start processing capture requests.
| |||||||||||
This method is called every time the session has no more capture requests to process.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This method is called when the session starts actively processing capture requests.
If capture requests are submitted prior to onConfigured(CameraCaptureSession)
being called,
then the session will start processing those requests immediately after the callback,
and this method will be immediately called after onConfigured(CameraCaptureSession)
.
If the session runs out of capture requests to process and calls onReady(CameraCaptureSession)
,
then this callback will be invoked again once new requests are submitted for capture.
session | the session returned by createCaptureSession(List
|
---|
This method is called when the session is closed.
A session is closed when a new session is created by the parent camera device, or when the parent camera device is closed (either by the user closing the device, or due to a camera device disconnection or fatal error).
Once a session is closed, all methods on it will throw an IllegalStateException, and
any repeating requests or bursts are stopped (as if stopRepeating()
was called).
However, any in-progress capture requests submitted to the session will be completed
as normal.
session | the session returned by createCaptureSession(List
|
---|
This method is called if the session cannot be configured as requested.
This can happen if the set of requested outputs contains unsupported sizes, or too many outputs are requested at once.
The session is considered to be closed, and all methods called on it after this callback is invoked will throw an IllegalStateException. Any capture requests submitted to the session prior to this callback will be discarded and will not produce any callbacks on their listeners.
session | the session returned by createCaptureSession(List
|
---|
This method is called when the camera device has finished configuring itself, and the session can start processing capture requests.
If there are capture requests already queued with the session, they will start
processing once this callback is invoked, and the session will call onActive(CameraCaptureSession)
right after this callback is invoked.
If no capture requests have been submitted, then the session will invoke
onReady(CameraCaptureSession)
right after this callback.
If the camera device configuration fails, then onConfigureFailed(CameraCaptureSession)
will
be invoked instead of this callback.
session | the session returned by createCaptureSession(List
|
---|
This method is called every time the session has no more capture requests to process.
During the creation of a new session, this callback is invoked right after
onConfigured(CameraCaptureSession)
if no capture requests were submitted to the session prior to it
completing configuration.
Otherwise, this callback will be invoked any time the session finishes processing all of its active capture requests, and no repeating request or burst is set up.
session | the session returned by createCaptureSession(List
|
---|