camera_get_3a_lock_modes()

Retrieve the list of supported lock modes on the camera.

Synopsis:

#include <camera/camera_api.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 modes to retrieve from the camera and should be equal to the number of elements in the array you pass as the modes argument.

numsupported

A pointer that is updated with the number of lock modes that are supported by the camera.

modes

A pointer to an uint32 array. The array is updated with the lock modes supported by the camera. Ensure that you create an array with the same number of elements as indicated by the numasked argument.

Library:

libcamapi

Description:

The lock modes that are supported are returned as separate elements in an array. The following examples list the array elements that are returned:

For a camera where all three lock modes can be operated 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 autofocus and auto exposure need to be locked simultaneously, 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 autofocus, auto exposure, and auto white balance needs 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 that supports only autofocus, the array returned is as follows:

  • element 0: CAMERA_3A_AUTOFOCUS
  • element 1: CAMERA_3A_NONE

When calling this function, ensure that the modes argument points to an array which has at least the number of elements allocated as specified in the numasked argument. To determine an appropriate size for this array, you can invoke this function in presizing-mode by setting the numasked argument to 0 or modes argument set to NULL. When the function is invoked in this presizing-mode, the maximum array size required is returned in numsupported argument. You can then allocate an array of the appropriate size and invoke the function again with numasked argument set to the value returned previously in the numsupported argument.

Returns:

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