Retrieve an enumerated list of cameras available on the device.


#include <camera/camera_api.h>
camera_error_t camera_get_supported_cameras(unsigned int numasked, unsigned int *numsupported, camera_unit_t *cameras)



The requested number of camera units to return in the array.


A pointer to the number of camera units that you have access to. The argument is updated when the function completes successfully.


A pointer to the first element in a camera_unit_t array. The array is updated with the cameras that you have access to when the function completes successfully.




An array of camera units is returned in the cameras argument.

When calling this function, ensure that the cameras 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 cameras 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.


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