MLCameraDeviceStatusCallbacks
Module: Camera
#include <ml_camera_v2.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
void()(void data) | on_device_streaming Callback is invoked when the camera is streaming. |
void()(void data) | on_device_idle Callback is invoked when the camera stops streaming. |
void()(MLCameraDisconnectReason reason, void data) | on_device_disconnected Callback is invoked when the camera is disconnected. |
void()(MLCameraError error, void data) | on_device_error Callback is invoked when the camera encountered errors. |
Detailed Description
struct MLCameraDeviceStatusCallbacks;
Device status callbacks to be implemented by client to receive device status if callback mechanism is used.
Public Attributes Documentation
version
uint32_t version;
Version of this structure.
on_device_streaming
void(*)(void *data) on_device_streaming;
Callback is invoked when the camera is streaming.
Type | Description |
---|---|
void()(void data) | )(void *data) |
Parameters
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetDeviceStatusCallbacks. |
on_device_idle
void(*)(void *data) on_device_idle;
Callback is invoked when the camera stops streaming.
Type | Description |
---|---|
void()(void data) | )(void *data) |
Parameters
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetDeviceStatusCallbacks. |
on_device_disconnected
void(*)(MLCameraDisconnectReason reason, void *data) on_device_disconnected;
Callback is invoked when the camera is disconnected.
Type | Description |
---|---|
void()(MLCameraDisconnectReason reason, void data) | )(MLCameraDisconnectReason reason, void *data) |
Parameters
reason | Represents the reason for disconnection. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetDeviceStatusCallbacks. |
on_device_error
void(*)(MLCameraError error, void *data) on_device_error;
Callback is invoked when the camera encountered errors.
Type | Description |
---|---|
void()(MLCameraError error, void data) | )(MLCameraError error, void *data) |
Parameters
error | Represents the error type when happened. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetDeviceStatusCallbacks. |
Invalid: The camera device is not available.
Disabled: The camera device can't be opened due to a device policy.
Device error: The camera device encountered a fatal error such as the Headset device has lost connection or the hardware comm bus is busy and not be able to response and caused a timeout.
Service error: The camera service has encountered a fatal error and could not provide service.
Capture failed: The capture request has failed. on_capture_failed or on_capture_buffer_lost callbacks will be invoked when this error happens.