Find the cameras that have the specified features.
camera_error_t camera_find_capable(camera_feature_t *features, int nfeatures, camera_unit_t prevunit, camera_unit_t *nextunit)
A pointer that lists the features to search for.
The number of features specified in the first argument.
The previous unit that was queried or CAMERA_UNIT_NONE if this is the first call to this function.
A pointer to a camera_unit_t value where the function returns the next unit which supports all requested features.
You can use this function find cameras with features required for your application. For example, you can use it to find cameras which have flash or only cameras that face the front. This function is used to iterate through a list of cameras and is returned in the nextunit argument.
For example, to start iterating through the cameras, you set the prevunit argument to CAMERA_UNIT_NONE . Doing so, returns nextunit found on this iteration. If you wanted to continue iterating through the list of cameras, you would pass the value returned by the nextunit argument as the prevunit argument in your next call of the this function. When the end of the list is reached, nextunit returns with a value of CAMERA_UNIT_NONE .