camera_get_3a_lock_modes()

Updated: April 19, 2023

Retrieve the list of supported 3A lock modes on the camera

Synopsis:

#include <camera/camera_3a.h>
camera_error_t camera_get_3a_lock_modes(camera_handle_t handle,
                                        int numasked,
                                        int *numsupported,
                                        uint32_t *modes)

Arguments:

handle
The handle returned by a call to the camera_open() function.
numasked
The requested number of independently lockable 3A modes in the modes array. You can specify a value of 0 to determine the number of independently lockable 3A modes supported by the camera.
numsupported
The returned number of independently lockable 3A modes supported by the camera.
modes
A pointer to a uint32_t array. The array will be updated with the combinations of independently lockable 3A modes supported by the camera. Ensure that you allocate an array with numasked elements.

Library:

libcamapi

Description:

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:

For a camera where all three 3A algorithms can be locked independently, the array returned is as follows:
 - element 0: CAMERA_3A_AUTOFOCUS
 - element 1: CAMERA_3A_AUTOEXPOSURE
 - element 2: CAMERA_3A_AUTOWHITEBALANCE
 - element 3: CAMERA_3A_NONE
For a camera where auto focus 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_NONE
For a camera where auto focus, 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_NONE
For a camera where only auto focus may be locked, the array returned is as follows:
 - element 0: CAMERA_3A_AUTOFOCUS
 - element 1: CAMERA_3A_NONE

Ensure that the modes argument points to an array which 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. The function then returns, in the numsupported argument, the maximum array size required. You can then allocate an array of this size and invoke the function again with numasked set to that previous numsupported value.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.