MLCameraCaptureCallbacks
Module: Camera
Capture callbacks to be implemented by client to receive capture status if callback mechanism is used. More...
#include <ml_camera_v2.h>
Public Attributes
Type | Name |
---|---|
uint32_t | version |
void()(const MLCameraResultExtras extra, void *data) | on_capture_failed Callback is invoked when a capture has failed when the camera device failed to produce a capture result for the request. |
void()(void data) | on_capture_aborted Callback is invoked when an ongoing video or preview capture or both are aborted due to an error. This is not valid for MR Capture. |
void()(MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) | on_capture_completed Callback is invoked when capturing single frame is completed and result is available. For MRCapture null metadata handle. |
void()(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) | on_image_buffer_available Callback is invoked when a captured image buffer is available with MLCameraCaptureType_Image. |
void()(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) | on_video_buffer_available Callback is invoked when a captured video frame buffer is available with MLCameraCaptureType_Video. |
void()(const MLHandle buffer_handle, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) | on_preview_buffer_available Callback is invoked when a preview video frame buffer is available with MLCameraCaptureType_Preview. |
Detailed Description
struct MLCameraCaptureCallbacks;
Capture callbacks to be implemented by client to receive capture status if callback mechanism is used.
This structure must be initialized by calling MLCameraCaptureCallbacksInit() before use.
Deprecated since 1.4.0. Scheduled for removal.
Public Attributes Documentation
version
uint32_t version;
Version of this structure.
on_capture_failed
void(*)(const MLCameraResultExtras *extra, void *data) on_capture_failed;
Callback is invoked when a capture has failed when the camera device failed to produce a capture result for the request.
Type | Description |
---|---|
void()(const MLCameraResultExtras extra, void *data) | )(const MLCameraResultExtras extra, void data) |
Parameters
extra | Carries capture result information of current captured frame. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
on_capture_aborted
void(*)(void *data) on_capture_aborted;
Callback is invoked when an ongoing video or preview capture or both are aborted due to an error. This is not valid for MR Capture.
Type | Description |
---|---|
void()(void data) | )(void *data) |
Parameters
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
on_capture_completed
void(*)(MLHandle result_metadata_handle, const MLCameraResultExtras *extra, void *data) on_capture_completed;
Callback is invoked when capturing single frame is completed and result is available. For MRCapture null metadata handle.
Type | Description |
---|---|
void()(MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) | )(MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) |
Parameters
result_metadata_handle | Represents camera result metadata which could be used as input handle for camera result metadata related functions. | |
extra | Carries capture result information of current captured frame. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
on_image_buffer_available
void(*)(const MLCameraOutput *output, const MLHandle result_metadata_handle, const MLCameraResultExtras *extra, void *data) on_image_buffer_available;
Callback is invoked when a captured image buffer is available with MLCameraCaptureType_Image.
Type | Description |
---|---|
void()(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) | )(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) |
Parameters
output | Provides image properties and buffer pointer to image data. | |
result_metadata_handle | Handle to metadata of captured frame. | |
extra | Carries capture result information of current captured frame. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
on_video_buffer_available
void(*)(const MLCameraOutput *output, const MLHandle result_metadata_handle, const MLCameraResultExtras *extra, void *data) on_video_buffer_available;
Callback is invoked when a captured video frame buffer is available with MLCameraCaptureType_Video.
Type | Description |
---|---|
void()(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) | )(const MLCameraOutput output, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) |
Parameters
output | Provides video frame properties and buffer pointer to video frame data. | |
result_metadata_handle | Handle to metadata of captured frame. | |
extra | Carries capture result information of current captured frame. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
on_preview_buffer_available
void(*)(const MLHandle buffer_handle, const MLHandle result_metadata_handle, const MLCameraResultExtras *extra, void *data) on_preview_buffer_available;
Callback is invoked when a preview video frame buffer is available with MLCameraCaptureType_Preview.
Type | Description |
---|---|
void()(const MLHandle buffer_handle, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void *data) | )(const MLHandle buffer_handle, const MLHandle result_metadata_handle, const MLCameraResultExtras extra, void data) |
Parameters
buffer_handle | Handle of preview buffer allocated for preview. | |
result_metadata_handle | Handle to metadata of captured frame. | |
extra | Carries capture result information of current captured frame. | |
data | Custom data to be returned when callback is triggered. This data passed in MLCameraSetCaptureCallbacks. |
This callback is not valid for MR Capture since it does not have preview support.