Retrieve the list of supported 3A lock modes on the camera
#include <camera/camera_3a.h>
camera_error_t camera_get_3a_lock_modes(camera_handle_t handle, int numasked, int *numsupported, uint32_t *modes)
The 3A lock modes, which are independently lockable, are returned as separate elements in an array. Not all of the 3A algorithms may be independently lockable. The following examples illustrate some possible modes lists that may be returned:
- element 0: CAMERA_3A_AUTOFOCUS - element 1: CAMERA_3A_AUTOEXPOSURE - element 2: CAMERA_3A_AUTOWHITEBALANCE - element 3: CAMERA_3A_NONEFor a camera where autofocus and auto exposure need to be locked simultaneously, and auto white balance may be locked independently, the array returned is as follows:
- element 0: CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE - element 1: CAMERA_3A_AUTOWHITEBALANCE - element 1: CAMERA_3A_NONEFor a camera where autofocus, auto exposure, and auto white balance need to be locked together, the array returned is as follows:
- element 0: CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE | CAMERA_3A_AUTOWHITEBALANCE - element 1: CAMERA_3A_NONEFor a camera where only autofocus may be locked, the array returned is as follows:
- element 0: CAMERA_3A_AUTOFOCUS - element 1: CAMERA_3A_NONE
You may can logically OR any of the elements of the returned modes list together to obtain a valid locks argument to use with the camera_set_3a_lock() function.
Ensure that the modes argument points to an array that has at least numasked elements allocated. To determine an appropriate size for this array, you can invoke this function in presizing mode by setting the numasked argument to 0 or the modes argument to NULL. When the function is invoked in this presizing mode, the maximum array size required is returned in the numsupported argument. You can then allocate an array of the appropriate size and invoke the function again with the numasked argument set to the value returned previously in the numsupported argument.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.