camera_find_capable()

Find the cameras that have the specified features.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_find_capable(camera_feature_t *features,                 
                                   int nfeatures,                 
                                   camera_unit_t prevunit,                 
                                   camera_unit_t *nextunit)

Since:

BlackBerry 10.0.0

Arguments:

features

A pointer to an array of camera_feature_t values.

nfeatures

The number of features specified in the first argument.

prevunit

The previous unit that was returned 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.

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

Use this function to find cameras with the features required for your application. For example, you can use it to find cameras which have a flash or that support video recording.

This function provides a list of cameras by implementing an iterator.

To start iterating through the cameras, set the prevunit argument to CAMERA_UNIT_NONE. Doing so returns the first camera found by the iterator that supports the list of features defined by features. The matching camera unit is returned in the nextunit argument. To continue iterating through the list, you can call this function again and set prevunit to the value previously returned by nextunit. In this way, the function is always searching the list using prevunit as the starting point. When the end of the list is reached, nextunit returns a value of CAMERA_UNIT_NONE.

Returns:

CAMERA_EOK when the function successfully completes. CAMERA_ENODEV indicates that the end of list was reached.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus