public abstract class FrameStateCallback extends Object
As input parameters of Camera#configure(CameraConfig), the callbacks are used to obtain the frame
processing states.
SystemCapability.Multimedia#CAMERA| 构造器 | 说明 |
|---|---|
FrameStateCallback() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onCaptureTriggerFinished(Camera camera,
int captureTriggerId,
long lastFrameNumber) |
Called when a triggered frame capture action is finished.
|
void |
onCaptureTriggerInterrupted(Camera camera,
int captureTriggerId) |
Called when a triggered frame capture action is stopped in advance.
|
void |
onCaptureTriggerStarted(Camera camera,
int captureTriggerId,
long firstFrameNumber) |
Called when frame capture is started by a trigger.
|
void |
onFrameError(Camera camera,
FrameConfig frameConfig,
int errorCode,
FrameResult frameResult) |
Called when an error occurs during the frame capture.
|
void |
onFrameFinished(Camera camera,
FrameConfig frameConfig,
FrameResult frameResult) |
Called when full frame capture results are generated for a frame capture.
|
void |
onFrameProgressed(Camera camera,
FrameConfig frameConfig,
FrameResult frameResult) |
Called when partial frame capture results are generated for a frame capture.
|
void |
onFrameStarted(Camera camera,
FrameConfig frameConfig,
long frameNumber,
long timestamp) |
Called when frame capture starts.
|
public void onFrameStarted(Camera camera, FrameConfig frameConfig, long frameNumber, long timestamp)
camera - Indicates the camera.frameConfig - Indicates the frame configuration.frameNumber - Indicates the frame number.timestamp - Indicates the time when frame capture starts.public void onFrameProgressed(Camera camera, FrameConfig frameConfig, FrameResult frameResult)
This method sends some of the results before the capture ends.
camera - Indicates the camera.frameConfig - Indicates the frame configuration.frameResult - Indicates frame capture results.public void onFrameFinished(Camera camera, FrameConfig frameConfig, FrameResult frameResult)
camera - Indicates the camera.frameConfig - Indicates the frame configuration.frameResult - Indicates all the capture results.public void onFrameError(Camera camera, FrameConfig frameConfig, int errorCode, FrameResult frameResult)
FrameStateCallback#onFrameFinished(Camera,
FrameConfig, FrameResult) will not be called for the capture.camera - Indicates the camera.frameConfig - Indicates the frame configuration.errorCode - Indicates the error code.frameResult - Indicates capture results.public void onCaptureTriggerStarted(Camera camera, int captureTriggerId, long firstFrameNumber)
A trigger can start one or more frame capture actions, and this callback identifies the start of this time of triggering.
camera - Indicates the camera.captureTriggerId - Indicates a trigger ID.firstFrameNumber - Indicates the frame number of the first frame in this capture.public void onCaptureTriggerFinished(Camera camera, int captureTriggerId, long lastFrameNumber)
A trigger can start one or more frame capture actions, and this callback identifies the end of this time of triggering.
camera - Indicates the camera.captureTriggerId - Indicates a trigger ID.lastFrameNumber - Indicates the frame number of the last frame in this capture.
The last frame number can be -1, indicating that no frame is captured.
public void onCaptureTriggerInterrupted(Camera camera, int captureTriggerId)
A trigger can start one or more frame capture actions at a time, and this callback identifies this time of triggering.
camera - Indicates the camera.captureTriggerId - Indicates a trigger ID.