camera_get_3a_face_priority_modes()

Retrieve the list of supported 3A face-detection priority modes on the camera.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_get_3a_face_priority_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 3A face-detection priority 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 3A face-detection priority modes that are supported by the camera.

modes

A pointer to an uint32 array. The array is updated with the 3A face-detection priority 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 3A face-detection priority 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 3A face-detection priority 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 used 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 used 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_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.