Retrieve the list of supported 3A face-detection priority modes on the camera.
#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)
BlackBerry 10.0.0
The handle returned by a call to the camera_open() function.
The requested number of independently switchable 3A face- detection priority modes in the modes array. You can use a value of 0 to determine the number of independently switchable 3A face-detection priority modes supported by the camera.
The returned number of independently switchable 3A face- detection priority modes supported by the camera.
A pointer to a uint32_t array. The array is updated with the combinations of independently switchable 3A face-detection priority modes supported by the camera. Ensure that you allocate an array with the same number of elements as specified in the numasked argument.
The 3A face-detection priority algorithms that are independently usable in face-detection priority mode are returned as separate elements in an array. Not all of the 3A algorithms may be independently usable in face-detection priority mode. 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_NONE
- element 0: CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE - element 1: CAMERA_3A_AUTOWHITEBALANCE - element 1: CAMERA_3A_NONE
- element 0: CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE | CAMERA_3A_AUTOWHITEBALANCE - element 1: CAMERA_3A_NONE
- element 0: CAMERA_3A_AUTOFOCUS - element 1: CAMERA_3A_NONE
You can safely OR any of the elements of the returned modes list together to obtain a valid priority argument for use with the camera_set_3a_face_priority() function.
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. 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.
If you are using CAMERA_VFMODE_DEFAULT, or if your application is running on a device which uses CAMERA_API_VERSION 2 or lower (BlackBerry 10.2.1 or older), the viewfinder must be running prior to calling this function. If you are using a different viewfinder mode, then this function may be queried before starting the viewfinder.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.