Arguments:

The previous unit that was queried or CAMERA_UNIT_NONE if this is the first call to this function.

nextunit

A pointer to a camera_unit_t value where the function returns the next unit which supports all requested features. A value of CAMERA_UNIT_NONE is returned when you reach the end of the list.

Library:

libcamapi

Description:

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.

Returns:

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